reworked transaction receipt handling
This commit is contained in:
@@ -74,24 +74,20 @@ def upgrade() -> None:
|
||||
sa.Column('height', sa.Integer(), nullable=False),
|
||||
sa.Column('state', sa.Enum('Requested', 'Signed', 'Sent', 'Mined', name='transactionjobstate'), nullable=False),
|
||||
sa.Column('request', dexorder.database.column_types.DataclassDictBase(astext_type=sa.Text()), nullable=False),
|
||||
sa.Column('tx_id', postgresql.BYTEA(), nullable=True),
|
||||
sa.Column('tx_data', postgresql.BYTEA(), nullable=True),
|
||||
sa.Column('receipt', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_index(op.f('ix_transactionjob_chain'), 'transactionjob', ['chain'], unique=False)
|
||||
op.create_index(op.f('ix_transactionjob_height'), 'transactionjob', ['height'], unique=False)
|
||||
op.create_index(op.f('ix_transactionjob_state'), 'transactionjob', ['state'], unique=False)
|
||||
op.create_table('tx',
|
||||
sa.Column('id', postgresql.BYTEA(), nullable=False),
|
||||
sa.Column('data', postgresql.BYTEA(), nullable=False),
|
||||
sa.Column('job_id', sa.UUID(), nullable=False),
|
||||
sa.Column('receipt', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
|
||||
sa.ForeignKeyConstraint(['job_id'], ['transactionjob.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_index(op.f('ix_transactionjob_tx_id'), 'transactionjob', ['tx_id'], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_table('tx')
|
||||
op.drop_index(op.f('ix_transactionjob_tx_id'), table_name='transactionjob')
|
||||
op.drop_index(op.f('ix_transactionjob_state'), table_name='transactionjob')
|
||||
op.drop_index(op.f('ix_transactionjob_height'), table_name='transactionjob')
|
||||
op.drop_index(op.f('ix_transactionjob_chain'), table_name='transactionjob')
|
||||
|
||||
Reference in New Issue
Block a user