mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
Merge branch 'master' into add-update-multiple-sms-sender
This commit is contained in:
33
migrations/versions/0126_add_annual_billing.py
Normal file
33
migrations/versions/0126_add_annual_billing.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0126_add_annual_billing
|
||||
Revises: 0125_add_organisation_type
|
||||
Create Date: 2017-10-19 11:38:32.849573
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
revision = '0126_add_annual_billing'
|
||||
down_revision = '0125_add_organisation_type'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table('annual_billing',
|
||||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('service_id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('financial_year_start', sa.Integer(), nullable=False),
|
||||
sa.Column('free_sms_fragment_limit', sa.Integer(), nullable=False),
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True),
|
||||
sa.Column('created_at', sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['service_id'], ['services.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_index(op.f('ix_annual_billing_service_id'), 'annual_billing', ['service_id'], unique=False)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_index(op.f('ix_annual_billing_service_id'), table_name='annual_billing')
|
||||
op.drop_table('annual_billing')
|
||||
|
||||
Reference in New Issue
Block a user