31 lines
897 B
Python
31 lines
897 B
Python
|
"""ofxrecord fk ofxaccount
|
||
|
|
||
|
Revision ID: 2d295ac0fc07
|
||
|
Revises: d68c4fbb811f
|
||
|
Create Date: 2016-06-23 08:29:29.911075
|
||
|
|
||
|
"""
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '2d295ac0fc07'
|
||
|
down_revision = 'd68c4fbb811f'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
from sqlalchemy.dialects import postgresql
|
||
|
|
||
|
def upgrade():
|
||
|
### commands auto generated by Alembic - please adjust! ###
|
||
|
op.add_column('ofxrecord', sa.Column('ofxaccount', postgresql.UUID(as_uuid=True), nullable=False))
|
||
|
op.create_foreign_key('fk_ofxaccount', 'ofxrecord', 'ofxaccount', ['ofxaccount'], ['uuid'])
|
||
|
### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_constraint('fk_ofxaccount', 'ofxrecord', type_='foreignkey')
|
||
|
op.drop_column('ofxrecord', 'ofxaccount')
|
||
|
### end Alembic commands ###
|