Debian Codegraph @

neutron_vpnaas/db/migration/alembic_migrations/versions/2023.2/expand/3b739d6906cf_vpn_scheduler.py

raw
1 # Copyright 2016 MingShuang Xian/IBM
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
16 """vpn scheduler
17
18 Revision ID: 3b739d6906cf
19 Revises: 5f884db48ba9
20 Create Date: 2016-08-15 03:32:46.124718
21
22 """
23
24 from alembic import op
25 import sqlalchemy as sa
26
27 # revision identifiers, used by Alembic.
28 revision = '3b739d6906cf'
29 down_revision = '5f884db48ba9'
30
31
32 def upgrade():
33 op.create_table(
34 'routervpnagentbindings',
35 sa.Column('router_id', sa.String(length=36),
36 unique=True, nullable=False),
37 sa.Column('vpn_agent_id', sa.String(length=36), nullable=False),
38 sa.ForeignKeyConstraint(['router_id'], ['routers.id'],
39 ondelete='CASCADE'),
40 sa.PrimaryKeyConstraint('router_id', 'vpn_agent_id'),
41 )