-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy patha3ab8757ca1c_.py
More file actions
61 lines (53 loc) · 2.06 KB
/
a3ab8757ca1c_.py
File metadata and controls
61 lines (53 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"""Create Initial Schema
Revision ID: a3ab8757ca1c
Revises:
Create Date: 2018-04-01 16:24:53.625283
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a3ab8757ca1c'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('application',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('body', sa.String(length=5000), nullable=True),
sa.Column('team', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('criteria',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=25), nullable=True),
sa.Column('description', sa.String(length=100), nullable=True),
sa.Column('min_score', sa.Integer(), nullable=True),
sa.Column('max_score', sa.Integer(), nullable=True),
sa.Column('weight', sa.Integer(), nullable=True),
sa.Column('medium', sa.Enum('Paper', 'Phone', name='interview_enum'), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('members',
sa.Column('username', sa.String(length=50), nullable=False),
sa.Column('team', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('username')
)
op.create_table('submission',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('application', sa.Integer(), nullable=True),
sa.Column('member', sa.String(length=50), nullable=True),
sa.Column('medium', sa.Enum('Paper', 'Phone', name='interview_enum'), nullable=True),
sa.Column('score', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['application'], ['application.id'], ),
sa.ForeignKeyConstraint(['member'], ['members.username'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('submission')
op.drop_table('members')
op.drop_table('criteria')
op.drop_table('application')
# ### end Alembic commands ###