[MM-45868] Add teamId to Threads table (#20915)
* Add teamId to Threads table * Get rid of multiple teamId reads * Fix failed test * Add teamId to standard queries * Fix linter * Get teamId from db
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6ac0faf99e
Коммит
fab9d350c7
1
db/migrations/postgres/000094_threads_teamid.down.sql
Обычный файл
1
db/migrations/postgres/000094_threads_teamid.down.sql
Обычный файл
@@ -0,0 +1 @@
|
||||
ALTER TABLE threads DROP COLUMN IF EXISTS teamid;
|
||||
2
db/migrations/postgres/000094_threads_teamid.up.sql
Обычный файл
2
db/migrations/postgres/000094_threads_teamid.up.sql
Обычный файл
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE threads ADD COLUMN IF NOT EXISTS teamid VARCHAR(26);
|
||||
UPDATE threads SET teamid = channels.teamid FROM channels WHERE threads.teamid IS NULL AND channels.id = threads.channelid;
|
||||
Ссылка в новой задаче
Block a user