Skip to content

Commit

Permalink
a fix on search path for the base migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
isacikgoz committed Aug 31, 2023
1 parent cd72089 commit b8c28c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/guides/postgres-migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ Once we set the schema to a desired state, we can start migrating the **data** b
$$ UPDATE {{ .source_schema }}.db_migrations set name='add_createat_to_teamembers' where version=92; $$,
$$ 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; $$;
$$ 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'; $$;
Once you save this configuration file, e.g. ``migration.load``, you can run the ``pgLoader`` with the following command:

Expand Down

0 comments on commit b8c28c1

Please sign in to comment.