feat: replace php migration with django migration
- keep latest legacy version in initial migration file - move propel schema to api legacy app - remove legacy upgrade tool
This commit is contained in:
parent
ee98387264
commit
0e4bc4cacd
85 changed files with 1005 additions and 1000 deletions
28
api/libretime_api/legacy/migrations/0003_2_5_2.py
Normal file
28
api/libretime_api/legacy/migrations/0003_2_5_2.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
from django.db import migrations
|
||||
|
||||
from ._migrations import legacy_migration_factory
|
||||
|
||||
UP = """
|
||||
-- Replacing system_version with schema_version
|
||||
DELETE FROM cc_pref WHERE keystr = 'system_version';
|
||||
INSERT INTO cc_pref (keystr, valstr) VALUES ('schema_version', '2.5.2');
|
||||
|
||||
ALTER TABLE cc_show ADD COLUMN image_path varchar(255) DEFAULT '';
|
||||
ALTER TABLE cc_show_instances ADD COLUMN description varchar(255) DEFAULT '';
|
||||
"""
|
||||
|
||||
DOWN = None
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("legacy", "0001_initial"),
|
||||
]
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
code=legacy_migration_factory(
|
||||
target="2.5.2",
|
||||
sql=UP,
|
||||
)
|
||||
)
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue