"Fossies" - the Fresh Open Source Software Archive

Member "neutron-14.0.3/neutron/db/migration/alembic_migrations/versions/pike/expand/62c781cb6192_add_qos_policies_default_table.py" (22 Oct 2019, 1319 Bytes) of package /linux/misc/openstack/neutron-14.0.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "62c781cb6192_add_qos_policies_default_table.py" see the Fossies "Dox" file reference documentation.

    1 # Copyright 2017 Intel Corporation
    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 from alembic import op
   17 import sqlalchemy as sa
   18 
   19 """add is default to qos policies
   20 
   21 Revision ID: 62c781cb6192
   22 Revises: 2b42d90729da
   23 Create Date: 2017-02-07 13:28:35.894357
   24 
   25 """
   26 
   27 # revision identifiers, used by Alembic.
   28 revision = '62c781cb6192'
   29 down_revision = '2b42d90729da'
   30 
   31 
   32 def upgrade():
   33     op.create_table(
   34         'qos_policies_default',
   35         sa.Column('qos_policy_id',
   36                   sa.String(length=36),
   37                   sa.ForeignKey('qos_policies.id', ondelete='CASCADE'),
   38                   nullable=False),
   39         sa.Column('project_id',
   40                   sa.String(length=255),
   41                   nullable=False,
   42                   index=True,
   43                   primary_key=True),
   44     )