"Fossies" - the Fresh Open Source Software Archive

Member "zun-4.0.0/zun/db/sqlalchemy/alembic/versions/72c6947c6636_create_table_image.py" (16 Oct 2019, 1843 Bytes) of package /linux/misc/openstack/zun-4.0.0.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 "72c6947c6636_create_table_image.py" see the Fossies "Dox" file reference documentation.

    1 # Licensed under the Apache License, Version 2.0 (the "License");
    2 #    you may not use this file except in compliance with the License.
    3 #    You may obtain a copy of the License at
    4 #
    5 #        http://www.apache.org/licenses/LICENSE-2.0
    6 #
    7 #    Unless required by applicable law or agreed to in writing, software
    8 #    distributed under the License is distributed on an "AS IS" BASIS,
    9 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   10 #    See the License for the specific language governing permissions and
   11 #    limitations under the License.
   12 
   13 """create_table_image
   14 
   15 Revision ID: 72c6947c6636
   16 Revises: 1192ba19a6e9
   17 Create Date: 2016-09-23 20:30:02.425937
   18 
   19 """
   20 
   21 # revision identifiers, used by Alembic.
   22 revision = '72c6947c6636'
   23 down_revision = '1192ba19a6e9'
   24 branch_labels = None
   25 depends_on = None
   26 
   27 from alembic import op
   28 import sqlalchemy as sa
   29 
   30 
   31 def upgrade():
   32     # commands auto generated by Alembic - please adjust! #
   33     op.create_table(
   34         'image',
   35         sa.Column('created_at', sa.DateTime(), nullable=True),
   36         sa.Column('updated_at', sa.DateTime(), nullable=True),
   37         sa.Column('id', sa.Integer(), nullable=False),
   38         sa.Column('project_id', sa.String(length=255), nullable=True),
   39         sa.Column('user_id', sa.String(length=255), nullable=True),
   40         sa.Column('uuid', sa.String(length=36), nullable=True),
   41         sa.Column('image_id', sa.String(length=255), nullable=True),
   42         sa.Column('repo', sa.String(length=255), nullable=True),
   43         sa.Column('tag', sa.String(length=255), nullable=True),
   44         sa.Column('size', sa.String(length=255), nullable=True),
   45         sa.PrimaryKeyConstraint('id'),
   46         sa.UniqueConstraint('repo', 'tag', name='uniq_image0repotag'),
   47         mysql_charset='utf8',
   48         mysql_engine='InnoDB'
   49         )
   50     #  end Alembic commands #