@@ -0,0 +1,1986 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4%0A#%0A# Copyright 2013 OpenStack LLC%0A#%0A#    Licensed under the Apache License, Version 2.0 (the %22License%22); you may%0A#    not use this file except in compliance with the License. You may obtain%0A#    a copy of the License at%0A#%0A#         http://www.apache.org/licenses/LICENSE-2.0%0A#%0A#    Unless required by applicable law or agreed to in writing, software%0A#    distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A#    License for the specific language governing permissions and limitations%0A#    under the License.%0A#%0A%0A%22%22%22nvp_netbinding%0A%0ARevision ID: 1d76643bcec4%0ARevises: 48b6f43f7471%0ACreate Date: 2013-01-15 07:36:10.024346%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '1d76643bcec4'%0Adown_revision = '48b6f43f7471'%0A%0A# Change to %5B'*'%5D if this migration applies to all plugins%0A%0Amigration_for_plugins = %5B%0A    'quantum.plugins.nicira.nicira_nvp_plugin.QuantumPlugin.NvpPluginV2'%0A%5D%0A%0Afrom alembic import op%0Aimport sqlalchemy as sa%0Afrom sqlalchemy.dialects import mysql%0A%0Afrom quantum.db import migration%0A%0A%0Adef upgrade(active_plugin=None, options=None):%0A    if not migration.should_run(active_plugin, migration_for_plugins):%0A        return%0A%0A    op.create_table(%0A        'nvp_network_bindings',%0A        sa.Column('network_id', sa.String(length=36), nullable=False),%0A        sa.Column('binding_type', sa.Enum('flat', 'vlan', 'stt', 'gre'),%0A                  nullable=False),%0A        sa.Column('tz_uuid', sa.String(length=36), nullable=True),%0A        sa.Column('vlan_id', sa.Integer(), nullable=True),%0A        sa.ForeignKeyConstraint(%5B'network_id'%5D, %5B'networks.id'%5D,%0A                                ondelete='CASCADE'),%0A        sa.PrimaryKeyConstraint('network_id'))%0A%0A%0Adef downgrade(active_plugin=None, options=None):%0A    if not migration.should_run(active_plugin, migration_for_plugins):%0A        return%0A%0A    op.drop_table('nvp_network_bindings')%0A

Add migration for network bindings in NVP plugin