Adding migration script for APG shared column

The following commit directly modified an existing
migration script:
847f41c275

but since the APG feature is present in mitaka as well,
and there might be some installations which already
have a mitaka deployment, its safer to add a migration
script.

Change-Id: I29f99053e5a2d360ce5ec0053065b85b4c9b9c32
This commit is contained in:
Sumit Naiksatam 2017-03-20 12:19:16 -07:00
parent 2b66cf1447
commit ccc9153559
3 changed files with 39 additions and 4 deletions

View File

@ -0,0 +1,38 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
"""apg_shared_attribute
Revision ID: 032f3315c315
Revises: 5239b0a50036
Create Date: 2017-03-20 21:13:08.98888
"""
# revision identifiers, used by Alembic.
revision = '032f3315c315'
down_revision = '5239b0a50036'
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
def upgrade():
op.add_column(
'gp_application_policy_groups',
sa.Column('shared', sa.Boolean, nullable=True,
server_default=sql.false())
)

View File

@ -1 +1 @@
5239b0a50036
032f3315c315

View File

@ -25,7 +25,6 @@ down_revision = 'daaa11a358a2'
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
def upgrade():
@ -38,8 +37,6 @@ def upgrade():
sa.Column('description', sa.String(length=255), nullable=True),
sa.Column('status', sa.String(length=16), nullable=True),
sa.Column('status_details', sa.String(length=4096), nullable=True),
sa.Column('shared', sa.Boolean, nullable=True,
server_default=sql.false()),
sa.PrimaryKeyConstraint('id'))
op.add_column(