Create usd_prices table
This commit is contained in:
parent
5756cb15a5
commit
5a3dbca425
30
alembic/versions/d540242ae368_create_usd_prices_table.py
Normal file
30
alembic/versions/d540242ae368_create_usd_prices_table.py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
"""Create usd_prices table
|
||||||
|
|
||||||
|
Revision ID: d540242ae368
|
||||||
|
Revises: 04a3bb3740c3
|
||||||
|
Create Date: 2021-11-18 04:30:06.802857
|
||||||
|
|
||||||
|
"""
|
||||||
|
import sqlalchemy as sa
|
||||||
|
from alembic import op
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = "d540242ae368"
|
||||||
|
down_revision = "2c90b2b8a80b"
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
op.create_table(
|
||||||
|
"usd_prices",
|
||||||
|
sa.Column("timestamp", sa.TIMESTAMP),
|
||||||
|
sa.Column("usd_price", sa.Numeric, nullable=False),
|
||||||
|
sa.Column("token_address", sa.String(256), nullable=False),
|
||||||
|
sa.PrimaryKeyConstraint("token_address", "timestamp"),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
op.drop_table("usd_prices")
|
Loading…
x
Reference in New Issue
Block a user