"""initial

Revision ID: 45079e4d0040
Revises: 
Create Date: 2014-12-07 22:53:45.581098

"""

# revision identifiers, used by Alembic.
revision = '45079e4d0040'
down_revision = None
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('service',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=False),
    sa.Column('trash', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('service_provider',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=512), nullable=False),
    sa.Column('availability', sa.Boolean(), nullable=True),
    sa.Column('phone_number', sa.String(length=20), nullable=False),
    sa.Column('address', sa.String(length=2048), nullable=False),
    sa.Column('home_location', postgresql.ARRAY(sa.Float(), dimensions=1), nullable=False),
    sa.Column('office_location', postgresql.ARRAY(sa.Float(), dimensions=1), nullable=False),
    sa.Column('cost', sa.Float(), nullable=True),
    sa.Column('service', sa.Integer(), nullable=True),
    sa.Column('experience', sa.Float(), nullable=True),
    sa.Column('skills', postgresql.ARRAY(postgresql.JSON(), dimensions=1), nullable=True),
    sa.Column('trash', sa.Boolean(), nullable=True),
    sa.ForeignKeyConstraint(['service'], ['service.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('service_provider')
    op.drop_table('service')
    ### end Alembic commands ###
