mirror of
https://github.com/simple-login/app.git
synced 2024-09-20 15:05:59 +08:00
add sql migration
This commit is contained in:
parent
4bbb07c3ce
commit
8e6fb9975d
38
migrations/versions/2020_081419_63fd3b240583_.py
Normal file
38
migrations/versions/2020_081419_63fd3b240583_.py
Normal file
|
@ -0,0 +1,38 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: 63fd3b240583
|
||||
Revises: a2b95b04d1f7
|
||||
Create Date: 2020-08-14 19:08:55.846514
|
||||
|
||||
"""
|
||||
import sqlalchemy_utils
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '63fd3b240583'
|
||||
down_revision = 'a2b95b04d1f7'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('monitoring',
|
||||
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
||||
sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
|
||||
sa.Column('host', sa.String(length=256), nullable=False),
|
||||
sa.Column('incoming_queue', sa.Integer(), nullable=False),
|
||||
sa.Column('active_queue', sa.Integer(), nullable=False),
|
||||
sa.Column('deferred_queue', sa.Integer(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('monitoring')
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in a new issue