<gh_stars>0
"""empty message

Revision ID: 2b6165814a4b
Revises: None
Create Date: 2016-07-11 13:01:29.947918

"""

# revision identifiers, used by Alembic.
revision = '2b6165814a4b'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('template_variable',
    sa.Column('key', sa.String(length=100), nullable=False),
    sa.Column('value', sa.String(length=250), nullable=True),
    sa.PrimaryKeyConstraint('key')
    )
    op.create_table('user',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=255), nullable=True),
    sa.Column('password', sa.String(length=255), nullable=True),
    sa.Column('email', sa.String(length=255), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('username')
    )
    op.create_table('customer',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=100), nullable=True),
    sa.Column('street', sa.String(length=250), nullable=True),
    sa.Column('city', sa.String(length=100), nullable=True),
    sa.Column('zip', sa.String(length=10), nullable=True),
    sa.Column('reference', sa.String(length=250), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('invoice',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('customer_id', sa.Integer(), nullable=True),
    sa.Column('reference_id', sa.Integer(), nullable=True),
    sa.Column('created', sa.DateTime(), nullable=True),
    sa.Column('due', sa.DateTime(), nullable=True),
    sa.Column('total_tax', sa.Float(), nullable=True),
    sa.Column('total_value', sa.Integer(), nullable=True),
    sa.Column('total_after_tax', sa.Float(), nullable=True),
    sa.Column('link_token', sa.String(length=255), nullable=True),
    sa.ForeignKeyConstraint(['customer_id'], ['customer.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('invoice_row',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('description', sa.String(length=250), nullable=True),
    sa.Column('tax', sa.Float(), nullable=True),
    sa.Column('value', sa.Integer(), nullable=True),
    sa.Column('invoice_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['invoice_id'], ['invoice.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('invoice_row')
    op.drop_table('invoice')
    op.drop_table('customer')
    op.drop_table('user')
    op.drop_table('template_variable')
    ### end Alembic commands ###

"""empty message

Revision ID: 2b6165814a4b
Revises: None
Create Date: 2016-07-11 13:01:29.947918

"""

# revision identifiers, used by Alembic.
revision = '2b6165814a4b'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('template_variable',
    sa.Column('key', sa.String(length=100), nullable=False),
    sa.Column('value', sa.String(length=250), nullable=True),
    sa.PrimaryKeyConstraint('key')
    )
    op.create_table('user',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=255), nullable=True),
    sa.Column('password', sa.String(length=255), nullable=True),
    sa.Column('email', sa.String(length=255), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('username')
    )
    op.create_table('customer',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=100), nullable=True),
    sa.Column('street', sa.String(length=250), nullable=True),
    sa.Column('city', sa.String(length=100), nullable=True),
    sa.Column('zip', sa.String(length=10), nullable=True),
    sa.Column('reference', sa.String(length=250), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('invoice',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('customer_id', sa.Integer(), nullable=True),
    sa.Column('reference_id', sa.Integer(), nullable=True),
    sa.Column('created', sa.DateTime(), nullable=True),
    sa.Column('due', sa.DateTime(), nullable=True),
    sa.Column('total_tax', sa.Float(), nullable=True),
    sa.Column('total_value', sa.Integer(), nullable=True),
    sa.Column('total_after_tax', sa.Float(), nullable=True),
    sa.Column('link_token', sa.String(length=255), nullable=True),
    sa.ForeignKeyConstraint(['customer_id'], ['customer.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('invoice_row',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('description', sa.String(length=250), nullable=True),
    sa.Column('tax', sa.Float(), nullable=True),
    sa.Column('value', sa.Integer(), nullable=True),
    sa.Column('invoice_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['invoice_id'], ['invoice.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('invoice_row')
    op.drop_table('invoice')
    op.drop_table('customer')
    op.drop_table('user')
    op.drop_table('template_variable')
    ### end Alembic commands ###
empty message  Revision ID: 2b6165814a4b Revises: None Create Date: 2016-07-11 13:01:29.947918 # revision identifiers, used by Alembic. ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ### ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ###