<filename>migrations/versions/175c80bee699_modelos_actualizado.py
"""modelos actualizado

Revision ID: 1<PASSWORD>
Revises: None
Create Date: 2016-05-19 10:38:47.632650

"""

# revision identifiers, used by Alembic.
revision = '175c<PASSWORD>'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('companies',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.Unicode(length=100), nullable=True),
    sa.Column('address', sa.Unicode(length=255), nullable=True),
    sa.Column('phone', sa.Unicode(length=50), nullable=True),
    sa.Column('website', sa.Unicode(length=255), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('name'),
    sa.UniqueConstraint('website')
    )
    op.create_table('skills',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.Unicode(length=50), nullable=True),
    sa.Column('description', sa.UnicodeText(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('name')
    )
    op.create_table('students',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.Unicode(length=255), nullable=True),
    sa.Column('last_name', sa.Unicode(length=255), nullable=True),
    sa.Column('age', sa.Integer(), nullable=True),
    sa.Column('email', sa.Unicode(length=50), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email')
    )
    op.create_table('company_skills',
    sa.Column('company_id', sa.Integer(), nullable=True),
    sa.Column('skills_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['company_id'], ['companies.id'], ),
    sa.ForeignKeyConstraint(['skills_id'], ['skills.id'], )
    )
    op.create_table('student_skills',
    sa.Column('student_id', sa.Integer(), nullable=True),
    sa.Column('skills_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['skills_id'], ['skills.id'], ),
    sa.ForeignKeyConstraint(['student_id'], ['students.id'], )
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('student_skills')
    op.drop_table('company_skills')
    op.drop_table('students')
    op.drop_table('skills')
    op.drop_table('companies')
    ### end Alembic commands ###

<filename>migrations/versions/175c80bee699_modelos_actualizado.py
"""modelos actualizado

Revision ID: 1<PASSWORD>
Revises: None
Create Date: 2016-05-19 10:38:47.632650

"""

# revision identifiers, used by Alembic.
revision = '175c<PASSWORD>'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('companies',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.Unicode(length=100), nullable=True),
    sa.Column('address', sa.Unicode(length=255), nullable=True),
    sa.Column('phone', sa.Unicode(length=50), nullable=True),
    sa.Column('website', sa.Unicode(length=255), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('name'),
    sa.UniqueConstraint('website')
    )
    op.create_table('skills',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.Unicode(length=50), nullable=True),
    sa.Column('description', sa.UnicodeText(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('name')
    )
    op.create_table('students',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.Unicode(length=255), nullable=True),
    sa.Column('last_name', sa.Unicode(length=255), nullable=True),
    sa.Column('age', sa.Integer(), nullable=True),
    sa.Column('email', sa.Unicode(length=50), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email')
    )
    op.create_table('company_skills',
    sa.Column('company_id', sa.Integer(), nullable=True),
    sa.Column('skills_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['company_id'], ['companies.id'], ),
    sa.ForeignKeyConstraint(['skills_id'], ['skills.id'], )
    )
    op.create_table('student_skills',
    sa.Column('student_id', sa.Integer(), nullable=True),
    sa.Column('skills_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['skills_id'], ['skills.id'], ),
    sa.ForeignKeyConstraint(['student_id'], ['students.id'], )
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('student_skills')
    op.drop_table('company_skills')
    op.drop_table('students')
    op.drop_table('skills')
    op.drop_table('companies')
    ### end Alembic commands ###

modelos actualizado  Revision ID: 1<PASSWORD> Revises: None Create Date: 2016-05-19 10:38:47.632650 # 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 ###