migrations: Fix typos/errors and add missing migrations (#19316)
* fix public channels creation script for mysql * fix several remaining migrations
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4a1a0863c4
Коммит
d0724d8b00
@@ -34,3 +34,17 @@ CREATE INDEX IF NOT EXISTS idx_posts_hashtags_txt ON posts USING gin(to_tsvector
|
||||
ALTER TABLE posts ADD COLUMN IF NOT EXISTS remoteid VARCHAR(26);
|
||||
|
||||
DROP INDEX IF EXISTS idx_posts_channel_id;
|
||||
|
||||
DO $$
|
||||
DECLARE
|
||||
column_exist boolean := false;
|
||||
BEGIN
|
||||
SELECT count(*) != 0 INTO column_exist
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'posts'
|
||||
AND column_name = 'fileids'
|
||||
AND NOT data_type = 'varchar(300)';
|
||||
IF column_exist THEN
|
||||
ALTER TABLE posts ALTER COLUMN fileids TYPE varchar(300);
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
Ссылка в новой задаче
Block a user