def main(): statement = "select exists (select * from pg_catalog.pg_database where datname = 'idfetch');" if get_scalar('postgres', 'postgres', statement): return raise Exception('The idfetch database does not exist')
def main(): statement = "select exists (select * from pg_catalog.pg_tables where schemaname = 'migrations' and tablename = 'migrations');" if get_scalar('idfetch', 'postgres', statement): return raise Exception('The migrations.migrations table does not exist')