Commit 3f3cf943 authored by contabo-server's avatar contabo-server
Browse files

initial migration script

parent e55851f1
"""empty message
Revision ID: 5834713e12c7
Revises:
Create Date: 2021-01-02 00:33:24.947857
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '5834713e12c7'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('Share',
sa.Column('ID', sa.String(length=64), nullable=False),
sa.Column('Name', sa.String(length=64), nullable=True),
sa.Column('Expires', sa.DateTime(), nullable=True),
sa.Column('DownloadLimit', sa.Integer(), nullable=False),
sa.Column('Public', sa.Boolean(), nullable=False),
sa.Column('Password', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('ID'),
sa.UniqueConstraint('ID')
)
op.create_table('Attachment',
sa.Column('ID', sa.INTEGER(), nullable=False),
sa.Column('filename', sa.String(), nullable=False),
sa.Column('ShareID', sa.String(length=64), nullable=False),
sa.ForeignKeyConstraint(['ShareID'], ['Share.ID'], ),
sa.PrimaryKeyConstraint('ID'),
sa.UniqueConstraint('ID')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('Attachment')
op.drop_table('Share')
# ### end Alembic commands ###
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment