ec4a35aa58ec_airtanah.py
2.79 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
"""airtanah
Revision ID: ec4a35aa58ec
Revises: 9f9e131f2dd5
Create Date: 2023-05-19 16:42:39.550791
"""
# revision identifiers, used by Alembic.
revision = 'ec4a35aa58ec'
down_revision = '9f9e131f2dd5'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
schema = 'pad'
context = op.get_context()
helpers = context.opts['helpers']
if not helpers.table_has_column('pad_customer_usaha', 'air_kualitas_id', schema):
op.add_column('pad_customer_usaha',
sa.Column('air_kualitas_id', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'air_sumber_id', schema):
op.add_column('pad_customer_usaha',
sa.Column('air_sumber_id', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'air_jenis_sumber_id', schema):
op.add_column('pad_customer_usaha',
sa.Column('air_jenis_sumber_id', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'volume', schema):
op.add_column('pad_customer_usaha',
sa.Column('volume', sa.Float), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'volume_progresif', schema):
op.add_column('pad_customer_usaha',
sa.Column('volume_progresif', sa.String(50)), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'volume_progresif_val', schema):
op.add_column('pad_customer_usaha',
sa.Column('volume_progresif_val', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'indeks_kp', schema):
op.add_column('pad_customer_usaha',
sa.Column('indeks_kp', sa.Float), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'kp', schema):
op.add_column('pad_customer_usaha',
sa.Column('kp', sa.Float), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'fna', schema):
op.add_column('pad_customer_usaha',
sa.Column('fna', sa.Float), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'hab', schema):
op.add_column('pad_customer_usaha',
sa.Column('hab', sa.Float), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'hda', schema):
op.add_column('pad_customer_usaha',
sa.Column('hda', sa.Integer), schema=schema)
if not helpers.table_has_column('pad_customer_usaha', 'npa', schema):
op.add_column('pad_customer_usaha',
sa.Column('npa', sa.Float), schema=schema)
def downgrade():
pass