mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Merge pull request #1810 from alphagov/vb-report-tasks
Alter primary key for ft_billing table to include international
This commit is contained in:
36
migrations/versions/0184_alter_primary_key_1.py
Normal file
36
migrations/versions/0184_alter_primary_key_1.py
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
"""
|
||||||
|
|
||||||
|
Revision ID: 0184_alter_primary_key_1
|
||||||
|
Revises: 0183_alter_primary_key
|
||||||
|
Create Date: 2018-03-28 16:05:54.648645
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
from sqlalchemy.dialects import postgresql
|
||||||
|
|
||||||
|
revision = '0184_alter_primary_key_1'
|
||||||
|
down_revision = '0183_alter_primary_key'
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
op.drop_constraint('ft_billing_pkey', 'ft_billing', type_='primary')
|
||||||
|
|
||||||
|
op.create_primary_key('ft_billing_pkey', 'ft_billing', ['bst_date',
|
||||||
|
'template_id',
|
||||||
|
'service_id',
|
||||||
|
'rate_multiplier',
|
||||||
|
'provider',
|
||||||
|
'notification_type',
|
||||||
|
'international'])
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
op.drop_constraint('ft_billing_pkey', 'ft_billing', type_='primary')
|
||||||
|
|
||||||
|
op.create_primary_key('ft_billing_pkey', 'ft_billing', ['bst_date',
|
||||||
|
'template_id',
|
||||||
|
'service_id',
|
||||||
|
'rate_multiplier',
|
||||||
|
'provider',
|
||||||
|
'notification_type'])
|
||||||
Reference in New Issue
Block a user