CREATE TYPE toloka_mgr.platform AS ENUM (
    'toloka',
    'yang'
);

-- Table task_type_info is small it is safe to update it in transaction
ALTER TABLE toloka_mgr.task_type_info
    ADD COLUMN platform toloka_mgr.platform NOT NULL DEFAULT 'toloka';


ALTER TABLE toloka_mgr.task ADD COLUMN platform toloka_mgr.platform;
ALTER TABLE toloka_mgr.task ALTER COLUMN platform SET DEFAULT 'toloka';


ALTER TABLE toloka_mgr.toloka_task ADD COLUMN platform toloka_mgr.platform;
ALTER TABLE toloka_mgr.toloka_task ALTER COLUMN platform SET DEFAULT 'toloka';

ALTER TABLE toloka_mgr.toloka_task_suite ADD COLUMN platform toloka_mgr.platform;
ALTER TABLE toloka_mgr.toloka_task_suite ALTER COLUMN platform SET DEFAULT 'toloka';
