f90cac1452
add, remove and list cloud cli commands complete as well as db models tweaked to high hell..
48 lines
1.6 KiB
Python
Executable File
48 lines
1.6 KiB
Python
Executable File
"""Adding Cloud and User models
|
|
|
|
Revision ID: 40d4c6d389ec
|
|
Revises: 2e26571834ea
|
|
Create Date: 2013-07-02 15:02:46.951119
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '40d4c6d389ec'
|
|
down_revision = '2e26571834ea'
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
def upgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('user',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('name', sa.String(length=60), nullable=True),
|
|
sa.Column('email', sa.String(length=200), nullable=True),
|
|
sa.Column('openid', sa.String(length=200), nullable=True),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('openid')
|
|
)
|
|
op.create_table('cloud',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('vendor_id', sa.Integer(), nullable=True),
|
|
sa.Column('endpoint', sa.String(length=120), nullable=True),
|
|
sa.Column('test_user', sa.String(length=80), nullable=True),
|
|
sa.Column('test_key', sa.String(length=80), nullable=True),
|
|
sa.Column('admin_endpoint', sa.String(length=120), nullable=True),
|
|
sa.Column('admin_user', sa.String(length=80), nullable=True),
|
|
sa.Column('admin_key', sa.String(length=80), nullable=True),
|
|
sa.ForeignKeyConstraint(['vendor_id'], ['vendor.id'], ),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('endpoint')
|
|
)
|
|
### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('cloud')
|
|
op.drop_table('user')
|
|
### end Alembic commands ###
|