| 1 |
# Copyright 2016 FUJITSU LABORATORIES LTD. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 |
# not use this file except in compliance with the License. You may obtain |
| 5 |
# a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 |
# License for the specific language governing permissions and limitations |
| 13 |
# under the License. |
| 14 |
|
| 15 |
from alembic import op |
| 16 |
from neutron.db import migration |
| 17 |
from neutron_lib import constants |
| 18 |
import sqlalchemy as sa |
| 19 |
|
| 20 |
|
| 21 |
"""add status |
| 22 |
|
| 23 |
Revision ID: fddbdec8711a |
| 24 |
Revises: 04625466c6fa |
| 25 |
Create Date: 2016-06-06 10:54:42.252898 |
| 26 |
|
| 27 |
""" |
| 28 |
|
| 29 |
# revision identifiers, used by Alembic. |
| 30 |
revision = 'fddbdec8711a' |
| 31 |
down_revision = '04625466c6fa' |
| 32 |
|
| 33 |
|
| 34 |
# milestone identifier, used by neutron-db-manage |
| 35 |
neutron_milestone = [ |
| 36 |
migration.NEWTON, |
| 37 |
migration.OCATA, |
| 38 |
migration.PIKE, |
| 39 |
migration.QUEENS, |
| 40 |
migration.ROCKY, |
| 41 |
] |
| 42 |
|
| 43 |
|
| 44 |
def upgrade(): |
| 45 |
op.add_column('tap_services', sa.Column('status', sa.String(16), |
| 46 |
server_default=constants.ACTIVE, |
| 47 |
nullable=False)) |
| 48 |
op.add_column('tap_flows', sa.Column('status', sa.String(16), |
| 49 |
server_default=constants.ACTIVE, |
| 50 |
nullable=False)) |