added alembic revision and updated gitignore
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
venv/
|
||||
venv
|
||||
*secret*
|
||||
dexorder.toml
|
||||
./contract
|
||||
/contract
|
||||
.idea
|
||||
__pycache__
|
||||
|
||||
44
alembic/versions/1da309899f95_.py
Normal file
44
alembic/versions/1da309899f95_.py
Normal file
@@ -0,0 +1,44 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 1da309899f95
|
||||
Revises:
|
||||
Create Date: 2023-09-18 19:18:11.706312
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '1da309899f95'
|
||||
down_revision: Union[str, None] = None
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('block',
|
||||
sa.Column('chain', sa.Integer(), nullable=False),
|
||||
sa.Column('height', sa.Integer(), nullable=False),
|
||||
sa.Column('hash', sa.LargeBinary(), nullable=False),
|
||||
sa.Column('parent', sa.LargeBinary(), nullable=False),
|
||||
sa.Column('data', postgresql.JSONB(astext_type=sa.Text()), nullable=False),
|
||||
sa.PrimaryKeyConstraint('chain', 'height', 'hash')
|
||||
)
|
||||
op.drop_table('migrations')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('migrations',
|
||||
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
||||
sa.Column('name', sa.VARCHAR(length=255), autoincrement=False, nullable=False),
|
||||
sa.Column('run_on', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
|
||||
sa.PrimaryKeyConstraint('id', name='migrations_pkey')
|
||||
)
|
||||
op.drop_table('block')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user