feat: delete cc_pref stream preferences rows
- Delete the previously deprecated cc_pref stream preferences rows.
This commit is contained in:
parent
8a6b5907be
commit
e54c8d22e1
|
@ -0,0 +1,46 @@
|
||||||
|
# pylint: disable=invalid-name
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
from ._migrations import legacy_migration_factory
|
||||||
|
|
||||||
|
UP = """
|
||||||
|
delete from cc_pref
|
||||||
|
where "keystr" in (
|
||||||
|
'default_icecast_password',
|
||||||
|
'default_stream_mount_point',
|
||||||
|
'live_dj_connection_url_override',
|
||||||
|
'live_dj_source_connection_url',
|
||||||
|
'master_dj_connection_url_override',
|
||||||
|
'master_dj_source_connection_url',
|
||||||
|
'max_bitrate',
|
||||||
|
'num_of_streams',
|
||||||
|
'stream_bitrate',
|
||||||
|
'stream_type'
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
|
||||||
|
DOWN = """
|
||||||
|
insert into
|
||||||
|
cc_pref ("keystr", "valstr")
|
||||||
|
values
|
||||||
|
('default_stream_mount_point', 'main'),
|
||||||
|
('max_bitrate', '320'),
|
||||||
|
('num_of_streams', '3'),
|
||||||
|
('stream_bitrate', '24, 32, 48, 64, 96, 128, 160, 192, 224, 256, 320'),
|
||||||
|
('stream_type', 'ogg, mp3, opus, aac');
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("legacy", "0041_drop_stream_setting_table"),
|
||||||
|
]
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(
|
||||||
|
code=legacy_migration_factory(
|
||||||
|
target="42",
|
||||||
|
sql=UP,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
]
|
|
@ -1,2 +1,2 @@
|
||||||
# The schema version is defined using the migration file prefix number
|
# The schema version is defined using the migration file prefix number
|
||||||
LEGACY_SCHEMA_VERSION = "41"
|
LEGACY_SCHEMA_VERSION = "42"
|
||||||
|
|
Loading…
Reference in New Issue