designate/designate/sqlalchemy
Thomas Bechtold 3a8452c65d Fix DB migration with postgresql
Check if a table already exists before creating it. This prevents the errors:

INFO migrate.versioning.api [designate-manage - - - - -] 69 -> 70...
CRITICAL designate [designate-manage - - - - -] ProgrammingError: \
         (psycopg2.ProgrammingError) type "resource_statuses" already exists

INFO migrate.versioning.api [designate-manage - - - - -] 85 -> 86...
CRITICAL designate [designate-manage - - - - -]
         ProgrammingError: (psycopg2.ProgrammingError) relation
         "unique_pool_host_port" already exists

INFO migrate.versioning.api [designate-manage - - - - -] 96 -> 97...
CRITICAL designate [designate-manage - - - - -]
         ProgrammingError: (psycopg2.ProgrammingError) type "service_statuses"
         already exists

ERROR designate ProgrammingError: (psycopg2.ProgrammingError) type
      "service_statuses" already exists
ERROR designate
      HINT:  A relation has an associated type of the same name, so you must
      use a name that doesn't conflict with any existing type.

when running the migration with postgresql.

Closes-Bug: #1640453
Change-Id: I3e8928c1b92d5c42e634abb992a4d931c44be01b
2016-11-11 17:36:54 +01:00
..
__init__.py Rename Moniker -> Designate 2013-06-09 21:15:03 +01:00
base.py Fix DB migration with postgresql 2016-11-11 17:36:54 +01:00
session.py Minor test cleanup 2016-02-05 11:25:53 +00:00
types.py Update UUID type for py3.5 compat 2016-07-12 16:03:08 +00:00
utils.py Improve performance of recordsets API 2016-08-12 15:54:36 +00:00