Files
team/server/channels/db/migrations/postgres/000150_add_translation_state.up.sql
0f7e5a1468 Autotranslations MVP (#34696)
---------

Co-authored-by: Elias Nahum <[email protected]>

Co-authored-by: Nick Misasi <[email protected]>

Co-authored-by: Matthew Birtch <[email protected]>
Co-authored-by: Mattermost Build <[email protected]>

Co-authored-by: Hanzo Dev <[email protected]>
2026-01-26 17:05:34 -05:00

10 lines
388 B
SQL

-- No default value - all inserts must explicitly provide a state
ALTER TABLE translations
ADD COLUMN IF NOT EXISTS state varchar(20) NOT NULL;
-- Create partial index for non-terminal states (processing, unavailable)
-- This index is only for states that need monitoring/cleanup
CREATE INDEX IF NOT EXISTS idx_translations_state
ON translations(state)
WHERE state IN ('processing');