diff --git a/doc/source/install/common_configure.rst b/doc/source/install/common_configure.rst index 0df41c8ca..e3c36654d 100644 --- a/doc/source/install/common_configure.rst +++ b/doc/source/install/common_configure.rst @@ -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" diff --git a/watcher/db/sqlalchemy/alembic/versions/d09a5945e4a0_add_action_description_table.py b/watcher/db/sqlalchemy/alembic/versions/d09a5945e4a0_add_action_description_table.py index e0c18709f..7f4db30bb 100644 --- a/watcher/db/sqlalchemy/alembic/versions/d09a5945e4a0_add_action_description_table.py +++ b/watcher/db/sqlalchemy/alembic/versions/d09a5945e4a0_add_action_description_table.py @@ -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', - 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('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') + 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('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') )