lavkach3
71 строка · 2.8 Кб
1"""${message}
2
3Revision ID: ${up_revision}
4Revises: ${down_revision | comma,n}
5Create Date: ${create_date}
6
7"""
8from alembic import op
9import sqlalchemy as sa
10import sqlalchemy_utils
11${imports if imports else ""}
12
13# revision identifiers, used by Alembic.
14revision = ${repr(up_revision)}
15down_revision = ${repr(down_revision)}
16branch_labels = ${repr(branch_labels)}
17depends_on = ${repr(depends_on)}
18
19
20def upgrade():
21${upgrades if upgrades else "pass"}
22op.execute("create sequence suggest_lsn_seq")
23op.execute("create sequence order_type_lsn_seq")
24op.execute("create sequence order_lsn_seq")
25op.execute("create sequence move_lsn_seq")
26op.execute("create sequence move_log_lsn_seq")
27op.execute("create sequence location_lsn_seq")
28op.execute("create sequence location_type_lsn_seq")
29op.execute("create sequence lot_lsn_seq")
30op.execute("create sequence product_storage_type_lsn_seq")
31op.execute("create sequence quant_lsn_seq")
32op.execute("create sequence channel_lsn_seq")
33op.execute("create sequence product_lsn_seq")
34op.execute("create sequence product_category_lsn_seq")
35op.execute("create sequence permission_lsn_seq")
36op.execute("create sequence role_lsn_seq")
37op.execute("create sequence partner_lsn_seq")
38op.execute("create sequence uom_lsn_seq")
39op.execute("create sequence uom_category_lsn_seq")
40op.execute("create sequence company_lsn_seq")
41op.execute("create sequence user_lsn_seq")
42op.execute("create sequence store_lsn_seq")
43op.execute("create sequence storage_type_lsn_seq")
44op.execute("create sequence bus_lsn_seq")
45
46def downgrade():
47${downgrades if downgrades else "pass"}
48op.execute("drop sequence suggest_lsn_seq")
49op.execute("drop sequence order_type_lsn_seq")
50op.execute("drop sequence order_lsn_seq")
51op.execute("drop sequence move_lsn_seq")
52op.execute("drop sequence move_log_lsn_seq")
53op.execute("drop sequence location_lsn_seq")
54op.execute("drop sequence location_type_lsn_seq")
55op.execute("drop sequence lot_lsn_seq")
56op.execute("drop sequence product_storage_type_lsn_seq")
57op.execute("drop sequence quant_lsn_seq")
58op.execute("drop sequence channel_lsn_seq")
59op.execute("drop sequence product_lsn_seq")
60op.execute("drop sequence product_category_lsn_seq")
61op.execute("drop sequence permission_lsn_seq")
62op.execute("drop sequence role_lsn_seq")
63op.execute("drop sequence partner_lsn_seq")
64op.execute("drop sequence uom_lsn_seq")
65op.execute("drop sequence uom_category_lsn_seq")
66op.execute("drop sequence company_lsn_seq")
67op.execute("drop sequence user_lsn_seq")
68op.execute("drop sequence contractor_lsn_seq")
69op.execute("drop sequence store_lsn_seq")
70op.execute("drop sequence storage_type_lsn_seq")
71op.execute("drop sequence bus_lsn_seq")