mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 00:11:16 -05:00
66 lines
2.7 KiB
Python
66 lines
2.7 KiB
Python
|
|
"""
|
||
|
|
|
||
|
|
Revision ID: 0343_org_billing_details
|
||
|
|
Revises: 0342_service_broadcast_settings
|
||
|
|
Create Date: 2021-02-01 14:40:14.809632
|
||
|
|
|
||
|
|
"""
|
||
|
|
from alembic import op
|
||
|
|
import sqlalchemy as sa
|
||
|
|
|
||
|
|
|
||
|
|
revision = '0343_org_billing_details'
|
||
|
|
down_revision = '0342_service_broadcast_settings'
|
||
|
|
|
||
|
|
|
||
|
|
def upgrade():
|
||
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
|
op.add_column('organisation', sa.Column('billing_contact_email_addresses', sa.Text(), nullable=True))
|
||
|
|
op.add_column('organisation', sa.Column('billing_contact_names', sa.Text(), nullable=True))
|
||
|
|
op.add_column('organisation', sa.Column('billing_reference', sa.String(length=255), nullable=True))
|
||
|
|
op.add_column('organisation', sa.Column('notes', sa.Text(), nullable=True))
|
||
|
|
op.add_column('organisation', sa.Column('purchase_order_number', sa.String(length=255), nullable=True))
|
||
|
|
op.alter_column('services', 'billing_contact_email_addresses',
|
||
|
|
existing_type=sa.VARCHAR(length=255),
|
||
|
|
type_=sa.Text(),
|
||
|
|
existing_nullable=True)
|
||
|
|
op.alter_column('services', 'billing_contact_names',
|
||
|
|
existing_type=sa.VARCHAR(length=255),
|
||
|
|
type_=sa.Text(),
|
||
|
|
existing_nullable=True)
|
||
|
|
op.alter_column('services_history', 'billing_contact_email_addresses',
|
||
|
|
existing_type=sa.VARCHAR(length=255),
|
||
|
|
type_=sa.Text(),
|
||
|
|
existing_nullable=True)
|
||
|
|
op.alter_column('services_history', 'billing_contact_names',
|
||
|
|
existing_type=sa.VARCHAR(length=255),
|
||
|
|
type_=sa.Text(),
|
||
|
|
existing_nullable=True)
|
||
|
|
# ### end Alembic commands ###
|
||
|
|
|
||
|
|
|
||
|
|
def downgrade():
|
||
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
|
op.alter_column('services_history', 'billing_contact_names',
|
||
|
|
existing_type=sa.Text(),
|
||
|
|
type_=sa.VARCHAR(length=255),
|
||
|
|
existing_nullable=True)
|
||
|
|
op.alter_column('services_history', 'billing_contact_email_addresses',
|
||
|
|
existing_type=sa.Text(),
|
||
|
|
type_=sa.VARCHAR(length=255),
|
||
|
|
existing_nullable=True)
|
||
|
|
op.alter_column('services', 'billing_contact_names',
|
||
|
|
existing_type=sa.Text(),
|
||
|
|
type_=sa.VARCHAR(length=255),
|
||
|
|
existing_nullable=True)
|
||
|
|
op.alter_column('services', 'billing_contact_email_addresses',
|
||
|
|
existing_type=sa.Text(),
|
||
|
|
type_=sa.VARCHAR(length=255),
|
||
|
|
existing_nullable=True)
|
||
|
|
op.drop_column('organisation', 'purchase_order_number')
|
||
|
|
op.drop_column('organisation', 'notes')
|
||
|
|
op.drop_column('organisation', 'billing_reference')
|
||
|
|
op.drop_column('organisation', 'billing_contact_names')
|
||
|
|
op.drop_column('organisation', 'billing_contact_email_addresses')
|
||
|
|
# ### end Alembic commands ###
|