mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
feat: add migration to move old files to xdg directory
+ add db column for migration version + handle pre-init migrations + handle post-init migration
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
from .sample import SampleMigrationModel
|
||||
"""
|
||||
Migrations for the main database.
|
||||
|
||||
main_db_migrations = [SampleMigrationModel]
|
||||
PLEASE NOTE: OLDER MIGRATIONS CAN NEVER BE DELETED.
|
||||
ONLY MODIFY OLD MIGRATIONS FOR BUG FIXES OR ENHANCEMENTS ONLY
|
||||
[TRY NOT TO MODIFY BEHAVIOR, UNLESS YOU KNOW WHAT YOU'RE DOING].
|
||||
"""
|
||||
|
||||
|
||||
main_db_migrations = []
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
class SampleMigrationModel:
|
||||
version = 1
|
||||
|
||||
@staticmethod
|
||||
def migrate():
|
||||
print("executing sample main db migration")
|
||||
Reference in New Issue
Block a user