mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
updates on the migration template (#24430)
This commit is contained in:
parent
07bea8792e
commit
47b51ff696
@ -5,7 +5,7 @@ LOAD DATABASE
|
|||||||
WITH data only,
|
WITH data only,
|
||||||
workers = 8, concurrency = 1,
|
workers = 8, concurrency = 1,
|
||||||
multiple readers per thread, rows per range = 50000,
|
multiple readers per thread, rows per range = 50000,
|
||||||
create no tables,
|
create no tables, create no indexes,
|
||||||
preserve index names
|
preserve index names
|
||||||
|
|
||||||
SET PostgreSQL PARAMETERS
|
SET PostgreSQL PARAMETERS
|
||||||
@ -26,12 +26,17 @@ CAST column Channels.Type to "channel_type" drop typemod,
|
|||||||
type tinyint when (<= precision 4) to boolean using tinyint-to-boolean,
|
type tinyint when (<= precision 4) to boolean using tinyint-to-boolean,
|
||||||
type json to jsonb drop typemod
|
type json to jsonb drop typemod
|
||||||
|
|
||||||
MATERIALIZE VIEWS exclude_products
|
EXCLUDING TABLE NAMES MATCHING ~<IR_>, ~<focalboard>
|
||||||
excluding table names matching ~<IR_>, ~<focalboard>
|
|
||||||
|
|
||||||
BEFORE LOAD DO
|
BEFORE LOAD DO
|
||||||
$$ ALTER SCHEMA public RENAME TO {{ .source_schema }}; $$
|
$$ ALTER SCHEMA public RENAME TO {{ .source_schema }}; $$,
|
||||||
|
$$ DROP INDEX IF EXISTS idx_posts_message_txt; $$,
|
||||||
|
$$ DROP INDEX IF EXISTS idx_fileinfo_content_txt; $$
|
||||||
|
|
||||||
AFTER LOAD DO
|
AFTER LOAD DO
|
||||||
$$ UPDATE {{ .source_schema }}.db_migrations set name='add_createat_to_teamembers' where version=92; $$,
|
$$ UPDATE {{ .source_schema }}.db_migrations set name='add_createat_to_teamembers' where version=92; $$,
|
||||||
$$ ALTER SCHEMA {{ .source_schema }} RENAME TO public; $$;
|
$$ CREATE INDEX IF NOT EXISTS idx_posts_message_txt ON {{ .source_schema }}.posts USING gin(to_tsvector('english', message)); $$,
|
||||||
|
$$ CREATE INDEX IF NOT EXISTS idx_fileinfo_content_txt ON {{ .source_schema }}.fileinfo USING gin(to_tsvector('english', content)); $$,
|
||||||
|
$$ ALTER SCHEMA {{ .source_schema }} RENAME TO public; $$,
|
||||||
|
$$ SELECT pg_catalog.set_config('search_path', '"$user", public', false); $$,
|
||||||
|
$$ ALTER USER {{ .pg_user }} SET SEARCH_PATH TO 'public'; $$;
|
||||||
|
Loading…
Reference in New Issue
Block a user