diff --git a/alembic/versions/16ac2bbf8b81_ofxsource_fid_nonunique.py b/alembic/versions/16ac2bbf8b81_ofxsource_fid_nonunique.py new file mode 100644 index 0000000..8a353c8 --- /dev/null +++ b/alembic/versions/16ac2bbf8b81_ofxsource_fid_nonunique.py @@ -0,0 +1,24 @@ +"""ofxsource_fid_nonunique + +Revision ID: 16ac2bbf8b81 +Revises: 3ec1289eae7a +Create Date: 2016-07-20 15:41:03.117666 + +""" + +# revision identifiers, used by Alembic. +revision = '16ac2bbf8b81' +down_revision = '3ec1289eae7a' +branch_labels = None +depends_on = None + +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import postgresql + +def upgrade(): + op.drop_constraint('uq_ofxsource_fid', 'ofxsource', type_='unique') + + +def downgrade(): + op.create_unique_constraint('uq_ofxsource_fid', 'ofxsource', ['fid']) diff --git a/vanth/tables.py b/vanth/tables.py index 728ac0a..339621d 100644 --- a/vanth/tables.py +++ b/vanth/tables.py @@ -48,7 +48,6 @@ OFXSource = table('ofxsource', Column('bankid', String(255), nullable=True), # The bank ID of the institution such as 324377516. # This may be a routing number Column('url', String(4096), nullable=False), # The base URL for the ofxsource - UniqueConstraint('fid', name='uq_ofxsource_fid'), ) OFXAccount = table('ofxaccount',