Skip to content

Commit 392ff76

Browse files
committed
Add Migration for Misssing Tables
1 parent 8e1efde commit 392ff76

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
"""empty message
2+
3+
Revision ID: 4d90006338cd
4+
Revises: 4d4d50316342
5+
Create Date: 2022-03-26 04:11:41.457277
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = '4d90006338cd'
14+
down_revision = '4d4d50316342'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.create_table('files',
22+
sa.Column('id', sa.Integer(), nullable=False),
23+
sa.Column('name', sa.Text(), nullable=False),
24+
sa.Column('author', sa.Text(), nullable=False),
25+
sa.Column('file_hash', sa.Text(), nullable=False),
26+
sa.PrimaryKeyConstraint('id')
27+
)
28+
op.create_table('harolds',
29+
sa.Column('id', sa.Integer(), nullable=False),
30+
sa.Column('file_hash', sa.Text(), nullable=False),
31+
sa.Column('owner', sa.Text(), nullable=False),
32+
sa.PrimaryKeyConstraint('id')
33+
)
34+
# ### end Alembic commands ###
35+
36+
37+
def downgrade():
38+
# ### commands auto generated by Alembic - please adjust! ###
39+
op.drop_table('harolds')
40+
op.drop_table('files')
41+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)