• Thomas Bechtold's avatar
    Fix DB migration with postgresql · 3a8452c6
    Thomas Bechtold authored
    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
    3a8452c6
Name
Last commit
Last update
api-ref/source Loading commit data...
contrib Loading commit data...
designate Loading commit data...
devstack Loading commit data...
doc Loading commit data...
etc/designate Loading commit data...
functionaltests Loading commit data...
rally-jobs Loading commit data...
releasenotes Loading commit data...
tools Loading commit data...
.coveragerc Loading commit data...
.gitignore Loading commit data...
.gitreview Loading commit data...
.testr.conf Loading commit data...
LICENSE Loading commit data...
README.rst Loading commit data...
babel.cfg Loading commit data...
designate.sublime-project Loading commit data...
ipa-requirements.txt Loading commit data...
openstack-common.conf Loading commit data...
requirements.txt Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...
test-requirements.txt Loading commit data...
tests-py3.txt Loading commit data...
tox.ini Loading commit data...