Skip to content

Conversation

@ypcat
Copy link

@ypcat ypcat commented Dec 23, 2016

>>> conn = psycopg2.connect(url)
>>> conn.cursor().execute("CREATE SCHEMA foo")
>>> dbSchema = postgres.PostgresSchema(conn)
>>> dbSchema.ensureSchemaTable()
Traceback (most recent call last):
  File ".../schemup/schemup/validator.py", line 23, in findSchemaMismatches
    for tableName, expectedSchema in dbSchema.getVersionedTableSchemas():
  File ".../schemup/schemup/dbs/postgres.py", line 88, in getVersionedTableSchemas
    "SELECT table_name, schema"
psycopg2.ProgrammingError: relation "schemup_tables" does not exist
LINE 1: SELECT table_name, schema FROM schemup_tables WHERE is_curre...

Use CREATE TABLE IF NOT EXISTS to skip checking against information_schema.tables. Requires Postgres 9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant