Skip to content

Commit 5e1a43f

Browse files
committed
Alembic script for k/v table
1 parent ceee4e5 commit 5e1a43f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""key/value table
2+
3+
Revision ID: 05e0693f8cbb
4+
Revises: 6b8cf99be000
5+
Create Date: 2021-03-18 11:35:43.512082
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = '05e0693f8cbb'
14+
down_revision = '6b8cf99be000'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
op.create_table(
21+
'kv_unique',
22+
sa.Column('_id', sa.Integer, primary_key=True),
23+
sa.Column('keycol', sa.String(50), nullable=False, unique=True),
24+
sa.Column('valcol', sa.String(65536), nullable=True),
25+
)
26+
27+
# op.create_index('kvk_ix', 'kv_unique', ['key'], unique=True)
28+
29+
30+
def downgrade():
31+
pass

0 commit comments

Comments
 (0)