Skip to content

Commit

Permalink
also update user_bank_accounts table
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan committed Jul 21, 2022
1 parent a30a324 commit 81ea471
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@
"""
from alembic import op
from sqlalchemy.orm import sessionmaker

# revision identifiers, used by Alembic.
revision = 'ab56e2d974a6'
down_revision = '08becec375f3'
branch_labels = None
depends_on = None

Session = sessionmaker()

def upgrade():
bind = op.get_bind()
session = Session(bind=bind)
res = session.execute("select wallet from users where user_id = 987591")
oldWallet = res.fetchall()[0][0]
op.execute("update users set wallet = '0x1111111111222222222233333333334444444444' where user_id = 987591;")
op.execute("update user_bank_accounts set ethereum_address = '0x1111111111222222222233333333334444444444' where ethereum_address = '{}';".format(oldWallet))


def downgrade():
Expand Down

0 comments on commit 81ea471

Please sign in to comment.