mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-18 13:09:08 +02:00
Fix alembic migration for rename peer host and peer port (#1039)
This commit is contained in:
parent
bb891117fa
commit
fba8bade01
1 changed files with 4 additions and 4 deletions
|
|
@ -20,17 +20,17 @@ def upgrade():
|
|||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('received_payment', schema=None) as batch_op:
|
||||
batch_op.add_column(
|
||||
sa.Column('peer_host', sa.String(), nullable=False))
|
||||
sa.Column('peer_host', sa.String(), nullable=False, server_default=sa.literal('')))
|
||||
batch_op.add_column(
|
||||
sa.Column('peer_port', sa.Integer(), nullable=False))
|
||||
sa.Column('peer_port', sa.Integer(), nullable=False, server_default=sa.text('0')))
|
||||
batch_op.drop_column('client_port')
|
||||
batch_op.drop_column('client_host')
|
||||
|
||||
with op.batch_alter_table('sent_offer', schema=None) as batch_op:
|
||||
batch_op.add_column(
|
||||
sa.Column('peer_host', sa.String(), nullable=False))
|
||||
sa.Column('peer_host', sa.String(), nullable=False, server_default=sa.literal('')))
|
||||
batch_op.add_column(
|
||||
sa.Column('peer_port', sa.Integer(), nullable=False))
|
||||
sa.Column('peer_port', sa.Integer(), nullable=False, server_default=sa.text('0')))
|
||||
batch_op.drop_column('client_port')
|
||||
batch_op.drop_column('client_host')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue