Skip to content

Commit

Permalink
adding command to remove old tables (#1186)
Browse files Browse the repository at this point in the history
* adding command to remove tables

* adding more tables
  • Loading branch information
shanbady authored Jun 27, 2024
1 parent e374b4d commit 1950648
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions channels/migrations/0009_rename_field_to_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,57 @@ class Migration(migrations.Migration):
]

operations = [
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_channel CASCADE", migrations.RunSQL.noop
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_channelgrouprole CASCADE",
migrations.RunSQL.noop,
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_channelinvitation CASCADE",
migrations.RunSQL.noop,
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_channelmembershipconfig CASCADE",
migrations.RunSQL.noop,
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_channelmembershipconfig_channels CASCADE",
migrations.RunSQL.noop,
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_channelsubscription CASCADE",
migrations.RunSQL.noop,
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_channelinvitation CASCADE",
migrations.RunSQL.noop,
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_comment CASCADE", migrations.RunSQL.noop
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_linkmeta CASCADE", migrations.RunSQL.noop
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_post CASCADE", migrations.RunSQL.noop
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_redditaccesstoken CASCADE",
migrations.RunSQL.noop,
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_redditrefreshtoken CASCADE",
migrations.RunSQL.noop,
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_spamcheckresult CASCADE",
migrations.RunSQL.noop,
),
migrations.RunSQL(
"DROP TABLE IF EXISTS channels_subscription CASCADE", migrations.RunSQL.noop
),
migrations.RenameModel(
old_name="FieldChannel",
new_name="Channel",
Expand Down

0 comments on commit 1950648

Please sign in to comment.