Merge "Fix Watcher DB schema creation"
This commit is contained in:
@@ -68,4 +68,4 @@
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
su -s /bin/sh -c "watcher-db-manage --config-file /etc/watcher/watcher.conf create_schema"
|
||||
su -s /bin/sh -c "watcher-db-manage --config-file /etc/watcher/watcher.conf upgrade"
|
||||
|
||||
@@ -6,25 +6,29 @@ Create Date: 2017-07-13 20:33:01.473711
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'd09a5945e4a0'
|
||||
down_revision = 'd098df6021e2'
|
||||
|
||||
from alembic import op
|
||||
import oslo_db
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'd09a5945e4a0'
|
||||
down_revision = 'd098df6021e2'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table('action_descriptions',
|
||||
op.create_table(
|
||||
'action_descriptions',
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True),
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True),
|
||||
sa.Column('deleted_at', sa.DateTime(), nullable=True),
|
||||
sa.Column('deleted', oslo_db.sqlalchemy.types.SoftDeleteInteger(), nullable=True),
|
||||
sa.Column('deleted', oslo_db.sqlalchemy.types.SoftDeleteInteger(),
|
||||
nullable=True),
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('action_type', sa.String(length=255), nullable=False),
|
||||
sa.Column('description', sa.String(length=255), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('action_type', name='uniq_action_description0action_type')
|
||||
sa.UniqueConstraint('action_type',
|
||||
name='uniq_action_description0action_type')
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user