Remove unique constraint on ofxsource.fid

Because we have several financial institutions with the same FID value.
Yeah.
This commit is contained in:
Eli Ribble 2016-07-20 15:41:33 -06:00
parent ae6b613ecb
commit 140f8fe6c7
2 changed files with 24 additions and 1 deletions

View File

@ -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'])

View File

@ -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',