180ade8e2494_penambahan_field_rincian_objek.py
3.95 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
"""Penambahan field rincian objek
Revision ID: 180ade8e2494
Revises: a52365776f0c
Create Date: 2023-03-13 17:41:59.001147
"""
# revision identifiers, used by Alembic.
import sqlalchemy as sa
from alembic import op
revision = '180ade8e2494'
down_revision = 'a52365776f0c'
branch_labels = None
depends_on = None
def upgrade():
schema = 'pad'
context = op.get_context()
helpers = context.opts['helpers']
# kd_restojmlmeja | integer | | |
# kd_restojmlkursi | integer | | |
# kd_restojmltamu | integer | | |
# kd_filmkursi | integer | | |
# kd_filmpertunjukan | integer | | |
# kd_filmtarif | double precision | | |
# kd_bilyarmeja | integer | | |
# kd_bilyartarif | double precision | | |
# kd_bilyarkegiatan | integer | | |
# kd_diskopengunjung | integer | | |
# kd_diskotarif | double precision | | |
# kd_waletvolume | integer
if not helpers.table_has_column('pad_customer_usaha', 'kd_restojmlmeja', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_restojmlmeja', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_restojmlkursi', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_restojmlkursi', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_restojmltamu', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_restojmltamu', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'jml_pegawai', schema):
op.add_column('pad_customer_usaha',
sa.Column('jml_pegawai', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_filmkursi', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_filmkursi', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_filmpertunjukan', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_filmpertunjukan', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_filmtarif', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_filmtarif', sa.Float), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_bilyarmeja', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_bilyarmeja', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_bilyartarif', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_bilyartarif', sa.Float), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_bilyarkegiatan', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_bilyarkegiatan', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_diskopengunjung', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_diskopengunjung', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_diskotarif', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_diskotarif', sa.Float), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kd_waletvolume', schema):
op.add_column('pad_customer_usaha',
sa.Column('kd_waletvolume', sa.Integer), schema=schema)
def downgrade():
pass