Add block timestamps table
This commit is contained in:
parent
dec628b7a9
commit
460f449127
29
alembic/versions/2c90b2b8a80b_add_blocks_table.py
Normal file
29
alembic/versions/2c90b2b8a80b_add_blocks_table.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
"""Add blocks table
|
||||||
|
|
||||||
|
Revision ID: 2c90b2b8a80b
|
||||||
|
Revises: 04a3bb3740c3
|
||||||
|
Create Date: 2021-11-17 18:29:13.065944
|
||||||
|
|
||||||
|
"""
|
||||||
|
import sqlalchemy as sa
|
||||||
|
from alembic import op
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = "2c90b2b8a80b"
|
||||||
|
down_revision = "04a3bb3740c3"
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
op.create_table(
|
||||||
|
"blocks",
|
||||||
|
sa.Column("block_number", sa.Numeric, nullable=False),
|
||||||
|
sa.Column("block_timestamp", sa.Numeric, nullable=False),
|
||||||
|
sa.PrimaryKeyConstraint("block_number"),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
op.drop_table("blocks")
|
Loading…
x
Reference in New Issue
Block a user