
# revision identifiers, used by Alembic.
revision = 'a1136d335540'
down_revision = 'd072f58ab240'

from alembic import op
import sqlalchemy as sa


docker_storage_driver_enum = sa.Enum('devicemapper', 'overlay',
                                     name='docker_storage_driver')


def upgrade():
    op.add_column('baymodel', sa.Column('docker_storage_driver',
                                        docker_storage_driver_enum,
                                        nullable=True))


# revision identifiers, used by Alembic.
revision = 'a1136d335540'
down_revision = 'd072f58ab240'

from alembic import op
import sqlalchemy as sa


docker_storage_driver_enum = sa.Enum('devicemapper', 'overlay',
                                     name='docker_storage_driver')


def upgrade():
    docker_storage_driver_enum.create(op.get_bind(), checkfirst=True)
    op.add_column('baymodel', sa.Column('docker_storage_driver',
                                        docker_storage_driver_enum,
                                        nullable=True))

Fix for enum type docker_storage_driver
Fix for enum type docker_storage_driver

Create enum type "docker_storage_driver" for migration

This is fixing
   oslo_db.exception.DBError: (psycopg2.ProgrammingError) type
   "docker_storage_driver" does not exist

Closes-Bug: #1609776

Change-Id: I92d427e90bd73b4114d8688d3761cabac450fc9d

  
  # revision identifiers, used by Alembic.
  revision = 'a1136d335540'
  down_revision = 'd072f58ab240'
  
  from alembic import op
  import sqlalchemy as sa
  
  
  docker_storage_driver_enum = sa.Enum('devicemapper', 'overlay',
                                       name='docker_storage_driver')
  
  
  def upgrade():
+     docker_storage_driver_enum.create(op.get_bind(), checkfirst=True)
      op.add_column('baymodel', sa.Column('docker_storage_driver',
                                          docker_storage_driver_enum,
                                          nullable=True))
  
Fix for enum type docker_storage_driver
## Code Before:

# revision identifiers, used by Alembic.
revision = 'a1136d335540'
down_revision = 'd072f58ab240'

from alembic import op
import sqlalchemy as sa


docker_storage_driver_enum = sa.Enum('devicemapper', 'overlay',
                                     name='docker_storage_driver')


def upgrade():
    op.add_column('baymodel', sa.Column('docker_storage_driver',
                                        docker_storage_driver_enum,
                                        nullable=True))

## Instruction:
Fix for enum type docker_storage_driver
## Code After:

# revision identifiers, used by Alembic.
revision = 'a1136d335540'
down_revision = 'd072f58ab240'

from alembic import op
import sqlalchemy as sa


docker_storage_driver_enum = sa.Enum('devicemapper', 'overlay',
                                     name='docker_storage_driver')


def upgrade():
    docker_storage_driver_enum.create(op.get_bind(), checkfirst=True)
    op.add_column('baymodel', sa.Column('docker_storage_driver',
                                        docker_storage_driver_enum,
                                        nullable=True))
