lavkach3

Форк
0
/
script.py.mako 
71 строка · 2.8 Кб
1
"""${message}
2

3
Revision ID: ${up_revision}
4
Revises: ${down_revision | comma,n}
5
Create Date: ${create_date}
6

7
"""
8
from alembic import op
9
import sqlalchemy as sa
10
import sqlalchemy_utils
11
${imports if imports else ""}
12

13
# revision identifiers, used by Alembic.
14
revision = ${repr(up_revision)}
15
down_revision = ${repr(down_revision)}
16
branch_labels = ${repr(branch_labels)}
17
depends_on = ${repr(depends_on)}
18

19

20
def upgrade():
21
    ${upgrades if upgrades else "pass"}
22
    op.execute("create sequence suggest_lsn_seq")
23
    op.execute("create sequence order_type_lsn_seq")
24
    op.execute("create sequence order_lsn_seq")
25
    op.execute("create sequence move_lsn_seq")
26
    op.execute("create sequence move_log_lsn_seq")
27
    op.execute("create sequence location_lsn_seq")
28
    op.execute("create sequence location_type_lsn_seq")
29
    op.execute("create sequence lot_lsn_seq")
30
    op.execute("create sequence product_storage_type_lsn_seq")
31
    op.execute("create sequence quant_lsn_seq")
32
    op.execute("create sequence channel_lsn_seq")
33
    op.execute("create sequence product_lsn_seq")
34
    op.execute("create sequence product_category_lsn_seq")
35
    op.execute("create sequence permission_lsn_seq")
36
    op.execute("create sequence role_lsn_seq")
37
    op.execute("create sequence partner_lsn_seq")
38
    op.execute("create sequence uom_lsn_seq")
39
    op.execute("create sequence uom_category_lsn_seq")
40
    op.execute("create sequence company_lsn_seq")
41
    op.execute("create sequence user_lsn_seq")
42
    op.execute("create sequence store_lsn_seq")
43
    op.execute("create sequence storage_type_lsn_seq")
44
    op.execute("create sequence bus_lsn_seq")
45

46
def downgrade():
47
    ${downgrades if downgrades else "pass"}
48
    op.execute("drop sequence suggest_lsn_seq")
49
    op.execute("drop sequence order_type_lsn_seq")
50
    op.execute("drop sequence order_lsn_seq")
51
    op.execute("drop sequence move_lsn_seq")
52
    op.execute("drop sequence move_log_lsn_seq")
53
    op.execute("drop sequence location_lsn_seq")
54
    op.execute("drop sequence location_type_lsn_seq")
55
    op.execute("drop sequence lot_lsn_seq")
56
    op.execute("drop sequence product_storage_type_lsn_seq")
57
    op.execute("drop sequence quant_lsn_seq")
58
    op.execute("drop sequence channel_lsn_seq")
59
    op.execute("drop sequence product_lsn_seq")
60
    op.execute("drop sequence product_category_lsn_seq")
61
    op.execute("drop sequence permission_lsn_seq")
62
    op.execute("drop sequence role_lsn_seq")
63
    op.execute("drop sequence partner_lsn_seq")
64
    op.execute("drop sequence uom_lsn_seq")
65
    op.execute("drop sequence uom_category_lsn_seq")
66
    op.execute("drop sequence company_lsn_seq")
67
    op.execute("drop sequence user_lsn_seq")
68
    op.execute("drop sequence contractor_lsn_seq")
69
    op.execute("drop sequence store_lsn_seq")
70
    op.execute("drop sequence storage_type_lsn_seq")
71
    op.execute("drop sequence bus_lsn_seq")

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.