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

Source Code for Module acac8d3ae868_add_table_for_graph_statistics

 1  """add table for graph statistics 
 2   
 3  Revision ID: acac8d3ae868 
 4  Revises: 10029c92dd0d 
 5  Create Date: 2018-06-28 11:39:43.913783 
 6   
 7  """ 
 8   
 9  # revision identifiers, used by Alembic. 
10  revision = 'acac8d3ae868' 
11  down_revision = '10029c92dd0d' 
12   
13  from alembic import op 
14  import sqlalchemy as sa 
15   
16   
17 -def upgrade():
18 # ### commands auto generated by Alembic - please adjust! ### 19 op.create_table('builds_statistics', 20 sa.Column('time', sa.Integer(), nullable=False), 21 sa.Column('stat_type', sa.Text(), nullable=False), 22 sa.Column('running', sa.Integer(), nullable=True), 23 sa.Column('pending', sa.Integer(), nullable=True), 24 sa.PrimaryKeyConstraint('time', 'stat_type') 25 ) 26 op.create_index(op.f('ix_build_chroot_started_on'), 'build_chroot', ['started_on'], unique=False)
27 # ### end Alembic commands ### 28 29
30 -def downgrade():
31 # ### commands auto generated by Alembic - please adjust! ### 32 op.drop_index(op.f('ix_build_chroot_started_on'), table_name='build_chroot') 33 op.drop_table('builds_statistics')
34 # ### end Alembic commands ### 35