"""add compose details and compose job details table

Revision ID: 1868e29e8306
Revises: 55932e5d6b3f
Create Date: 2016-04-26 18:28:54.865917

"""

# revision identifiers, used by Alembic.
revision = '1868e29e8306'
down_revision = '55932e5d6b3f'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table('compose_details',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('date', sa.DateTime(), nullable=False),
        sa.Column('compose_id', sa.String(length=255), nullable=False,
                  unique=True),
        sa.Column('respin', sa.String(length=255), nullable=False),
        sa.Column('type', sa.String(length=255), nullable=False),
        sa.Column('passed', sa.Integer(), nullable=True, default=0),
        sa.Column('failed', sa.Integer(), nullable=True, default=0),
        sa.Column('status', sa.String(length=255), nullable=True)
        sa.Column('created_on', sa.DateTime(), nullable=False),
        sa.Column('last_updated', sa.DateTime(), nullable=False),
        sa.Column('location', sa.String(length=255), nullable=False),
        sa.PrimaryKeyConstraint('id')
    )
    op.create_table(
        'compose_job_details',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('arch', sa.String(length=255), nullable=True)
        sa.Column('compose_id', sa.String(length=255), nullable=False),
        sa.Column('created_on', sa.DateTime(), nullable=False),
        sa.Column('family', sa.String(length=255), nullable=True)
        sa.Column('image_url', sa.String(length=255), nullable=False),
        sa.Column('last_updated', sa.DateTime(), nullable=True),
        sa.Column('output', sa.Text(), nullable=False),
        sa.Column('release', sa.String(length=255), nullable=True)
        sa.Column('status', sa.String(length=255), nullable=False)
        sa.Column('subvariant', sa.String(length=255), nullable=False)
        sa.Column('user', sa.String(length=255), nullable=False),
        sa.Column('image_format', sa.String(length=255), nullable=False),
        sa.Column('image_type', sa.String(length=255), nullable=False),
        sa.Column('image_name', sa.String(length=255), nullable=False),
        sa.PrimaryKeyConstraint('id')
    )
    pass


def downgrade():
    op.drop_table('compose_details')
    os.drop_table('compose_job_details')
    pass

@@ -359,24 +359,33 @@
 reate_table(
+%0A        
 'compose_det
@@ -383,32 +383,32 @@
 mpose_details',%0A
-
         sa.Colum
@@ -936,32 +936,33 @@
 , nullable=True)
+,
 %0A        sa.Colu
@@ -1352,32 +1352,33 @@
 , nullable=True)
+,
 %0A        sa.Colu
@@ -1555,32 +1555,33 @@
 , nullable=True)
+,
 %0A        sa.Colu
@@ -1823,16 +1823,17 @@
 le=True)
+,
 %0A       
@@ -1883,32 +1883,33 @@
  nullable=False)
+,
 %0A        sa.Colu
@@ -1963,16 +1963,17 @@
 e=False)
+,
 %0A       
@@ -2363,17 +2363,17 @@
 ')%0A    o
-s
+p
 .drop_ta

Fix the alembic version scripts