Module cb928c34d36c_add_actionsstatistics_table
[hide private]
[frames] | no frames]

Source Code for Module cb928c34d36c_add_actionsstatistics_table

 1  """ 
 2  add ActionsStatistics table 
 3   
 4  Revision ID: cb928c34d36c 
 5  Revises: 2db1d0557b06 
 6  Create Date: 2019-12-06 09:33:12.210295 
 7  """ 
 8   
 9  import sqlalchemy as sa 
10  from alembic import op 
11   
12   
13  revision = 'cb928c34d36c' 
14  down_revision = '2db1d0557b06' 
15   
16 -def upgrade():
17 op.create_table('actions_statistics', 18 sa.Column('time', sa.Integer(), nullable=False), 19 sa.Column('stat_type', sa.Text(), nullable=False), 20 sa.Column('waiting', sa.Integer(), nullable=True), 21 sa.Column('success', sa.Integer(), nullable=True), 22 sa.Column('failed', sa.Integer(), nullable=True), 23 sa.PrimaryKeyConstraint('time', 'stat_type') 24 )
25
26 -def downgrade():
27 op.drop_table('actions_statistics')
28