kopia lustrzana https://github.com/bugout-dev/moonstream
43 wiersze
1.5 KiB
Python
43 wiersze
1.5 KiB
Python
"""Added tables to store data from Ethereum Signature Database
|
|
|
|
Revision ID: 1e33c3d07306
|
|
Revises: aa903a90b8bf
|
|
Create Date: 2021-07-27 00:04:31.042487
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '1e33c3d07306'
|
|
down_revision = 'aa903a90b8bf'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('esd_event_signatures',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('text_signature', sa.Text(), nullable=False),
|
|
sa.Column('hex_signature', sa.VARCHAR(length=66), nullable=False),
|
|
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
|
|
sa.PrimaryKeyConstraint('id', name=op.f('pk_esd_event_signatures'))
|
|
)
|
|
op.create_table('esd_function_signatures',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('text_signature', sa.Text(), nullable=False),
|
|
sa.Column('hex_signature', sa.VARCHAR(length=10), nullable=False),
|
|
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
|
|
sa.PrimaryKeyConstraint('id', name=op.f('pk_esd_function_signatures'))
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('esd_function_signatures')
|
|
op.drop_table('esd_event_signatures')
|
|
# ### end Alembic commands ###
|