Remove emergency alerts db schema
Lots to read in the commits
I've tested this against a backup of staging - both upgrades and downgrades - i'll chat about that in a tech catchup soon
- [ ] delete data (#4201)
- [ ] clear redis
- [ ] delete code (#3976)
- [ ] delete db schemas 🚨 you are here 🚨
the squawk failures are:
warning: ban-drop-table
note: Dropping a table may break existing clients.
warning: changing-column-type
note: Requires an ACCESS EXCLUSIVE lock on the table which blocks reads. note: Changing the type may break existing clients.
i think these are okay. we've done the work to remove reference to these tables so that we can drop them the access exclusive lock on the tables is unavoidable. if we're concerned (and we might be), we might want to consider running each table (templates, templates_history, service_contact_list) in their own migrations 🤔
Full output
/tmp/upgrade.sql:96:2: warning: ban-drop-table
96 | -- Running upgrade 0465_delete_broadcast_data -> 0466_delete_broadcast_tables
97 |
98 | DROP TABLE service_broadcast_settings;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:100:2: warning: ban-drop-table
100 | DROP TABLE broadcast_channel_types;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:102:2: warning: ban-drop-table
102 | DROP TABLE broadcast_provider_message_number;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:104:2: warning: ban-drop-table
104 | DROP TABLE broadcast_provider_message;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:106:2: warning: ban-drop-table
106 | DROP TABLE broadcast_event;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:108:2: warning: ban-drop-table
108 | DROP TABLE broadcast_provider_message_status_type;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:110:2: warning: ban-drop-table
110 | DROP TABLE broadcast_message;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:112:2: warning: ban-drop-table
112 | DROP TABLE broadcast_provider_types;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:114:2: warning: ban-drop-table
114 | DROP TABLE service_broadcast_provider_restriction;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:116:2: warning: ban-drop-table
116 | DROP TABLE broadcast_status_type;
note: Dropping a table may break existing clients.
/tmp/upgrade.sql:118:2: warning: ban-drop-column
118 | ALTER TABLE templates DROP COLUMN broadcast_data;
note: Dropping a column may break existing clients.
/tmp/upgrade.sql:120:2: warning: ban-drop-column
120 | ALTER TABLE templates_history DROP COLUMN broadcast_data;
note: Dropping a column may break existing clients.
/tmp/upgrade.sql:136:2: warning: changing-column-type
136 | ALTER TABLE permissions ALTER COLUMN permission TYPE permission_types USING permission::text::permission_types;
note: Requires an ACCESS EXCLUSIVE lock on the table which blocks reads.
note: Changing the type may break existing clients.
/tmp/upgrade.sql:164:2: warning: changing-column-type
164 | ALTER TABLE templates ALTER COLUMN template_type TYPE template_type USING template_type::text::template_type;
note: Requires an ACCESS EXCLUSIVE lock on the table which blocks reads.
note: Changing the type may break existing clients.
/tmp/upgrade.sql:166:2: warning: changing-column-type
166 | ALTER TABLE templates_history ALTER COLUMN template_type TYPE template_type USING template_type::text::template_type;
note: Requires an ACCESS EXCLUSIVE lock on the table which blocks reads.
note: Changing the type may break existing clients.
/tmp/upgrade.sql:168:2: warning: changing-column-type
168 | ALTER TABLE service_contact_list ALTER COLUMN template_type TYPE template_type USING template_type::text::template_type;
note: Requires an ACCESS EXCLUSIVE lock on the table which blocks reads.
note: Changing the type may break existing clients.
test_current_alembic_head is also unhappy