415b13ebc457_.py
1.75 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
"""empty message
Revision ID: 415b13ebc457
Revises:
Create Date: 2020-08-26 02:18:08.862101
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '415b13ebc457'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('article',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('subject', sa.String(length=200), nullable=False),
sa.Column('content', sa.Text(), nullable=False),
sa.Column('create_date', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('project',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('projectName', sa.String(length=200), nullable=False),
sa.Column('projectType', sa.String(length=200), nullable=False),
sa.Column('pictureName', sa.String(length=200), nullable=False),
sa.Column('content', sa.Text(), nullable=False),
sa.Column('gitAddress', sa.String(length=200), nullable=False),
sa.Column('create_date', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('username', sa.String(length=150), nullable=False),
sa.Column('password', sa.String(length=200), nullable=False),
sa.Column('email', sa.String(length=120), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email'),
sa.UniqueConstraint('username')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user')
op.drop_table('project')
op.drop_table('article')
# ### end Alembic commands ###