mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-27 05:37:15 -05:00
MM-67510 Drop deprecated autotranslation column from ChannelMembers (#37496)
This commit is contained in:
@@ -421,3 +421,7 @@ channels/db/migrations/postgres/000212_add_scheduled_post_recurrence.down.sql
|
||||
channels/db/migrations/postgres/000212_add_scheduled_post_recurrence.up.sql
|
||||
channels/db/migrations/postgres/000213_add_scheduled_post_pending_index.down.sql
|
||||
channels/db/migrations/postgres/000213_add_scheduled_post_pending_index.up.sql
|
||||
channels/db/migrations/postgres/000214_drop_channelmembers_autotranslation.down.sql
|
||||
channels/db/migrations/postgres/000214_drop_channelmembers_autotranslation.up.sql
|
||||
channels/db/migrations/postgres/000215_drop_channelmembers_autotranslation_column.down.sql
|
||||
channels/db/migrations/postgres/000215_drop_channelmembers_autotranslation_column.up.sql
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
-- morph:nontransactional
|
||||
-- Recreate the partial index on the channelmembers autotranslation column,
|
||||
-- mirroring migration 000147. Runs after 000215 restores the column.
|
||||
-- CONCURRENTLY cannot run inside a transaction, so this must be the only
|
||||
-- statement in the file.
|
||||
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_channelmembers_autotranslation_enabled
|
||||
ON channelmembers (channelid)
|
||||
WHERE autotranslation = true;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
-- morph:nontransactional
|
||||
-- Drop the partial index on the deprecated channelmembers autotranslation
|
||||
-- column ahead of dropping the column itself in 000215. CONCURRENTLY cannot run
|
||||
-- inside a transaction, so this must be the only statement in the file.
|
||||
DROP INDEX CONCURRENTLY IF EXISTS idx_channelmembers_autotranslation_enabled;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
-- Recreate the deprecated channelmembers autotranslation column, mirroring
|
||||
-- migration 000147. Prior values are not restorable. The partial index is
|
||||
-- recreated separately in 000214.
|
||||
ALTER TABLE channelmembers
|
||||
ADD COLUMN IF NOT EXISTS autotranslation boolean NOT NULL DEFAULT false;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
-- Drop the deprecated channelmembers autotranslation column (opt-in semantics),
|
||||
-- replaced by autotranslationdisabled (opt-out) in migration 000151. The partial
|
||||
-- index on this column is dropped separately in 000214.
|
||||
ALTER TABLE channelmembers
|
||||
DROP COLUMN IF EXISTS autotranslation;
|
||||
Reference in New Issue
Block a user