5pub fn set_up_helpers(db: &mut dyn Conn, target_migration: &str) -> anyhow::Result<()> {
8 CREATE OR REPLACE FUNCTION reshape.is_new_schema()
11 setting TEXT := current_setting('reshape.is_new_schema', TRUE);
12 setting_bool BOOLEAN := setting IS NOT NULL AND setting = 'YES';
14 RETURN current_setting('search_path') = 'migration_{}' OR setting_bool;
16 $$ language 'plpgsql';
21 .context("failed creating helper function reshape.is_new_schema()")?;
26pub fn tear_down_helpers(db: &mut dyn Conn) -> anyhow::Result<()> {
27 db.query("DROP FUNCTION IF EXISTS reshape.is_new_schema;")?;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list