mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
fix migrations deleting all playlists
This commit is contained in:
committed by
Mungai Njoroge
parent
ae031014a9
commit
99ec11565c
@@ -10,7 +10,6 @@ ONLY MODIFY OLD MIGRATIONS FOR BUG FIXES OR ENHANCEMENTS ONLY
|
||||
PS: Fuck that! Do what you want.
|
||||
"""
|
||||
|
||||
|
||||
from app.db.sqlite.migrations import MigrationManager
|
||||
from app.logger import log
|
||||
from app.migrations import v1_3_0, v1_4_9
|
||||
@@ -27,9 +26,7 @@ migrations: list[list[Migration]] = [
|
||||
v1_3_0.RemoveAllTracks,
|
||||
v1_3_0.UpdateAppSettingsTable,
|
||||
],
|
||||
[
|
||||
v1_4_9.AddTimestampToFavoritesTable
|
||||
]
|
||||
[v1_4_9.AddTimestampToFavoritesTable],
|
||||
]
|
||||
|
||||
|
||||
@@ -41,8 +38,8 @@ def apply_migrations():
|
||||
version = MigrationManager.get_version()
|
||||
|
||||
if version != len(migrations):
|
||||
# run migrations after the previous migration version
|
||||
for migration in migrations[(version - 1) :]:
|
||||
# INFO: Apply new migrations
|
||||
for migration in migrations[version:]:
|
||||
for m in migration:
|
||||
try:
|
||||
m.migrate()
|
||||
|
||||
Reference in New Issue
Block a user