<reponame>cclauss/Baobab
"""Add organisation model

Revision ID: 016571f41a20
Revises: 2873f4f08a4b
Create Date: 2020-01-18 17:50:21.702261

"""

# revision identifiers, used by Alembic.
revision = '016571f41a20'
down_revision = '2873f4f08a4b'

from alembic import op
import sqlalchemy as sa


def upgrade():
    organisation = op.create_table('organisation',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=50), nullable=False),
    sa.Column('small_logo', sa.String(length=100), nullable=False),
    sa.Column('large_logo', sa.String(length=100), nullable=False),
    sa.Column('domain', sa.String(length=100), nullable=False),

    sa.PrimaryKeyConstraint('id')
    )

    op.bulk_insert(organisation,
    [
        {
            'id': 1,
            'name': 'Deep Learning Indaba',
            'small_logo': 'logo-32x32-white.png',
            'large_logo': 'indaba-logo-dark.png',
            'domain': 'deeplearningindaba'
        },
        {
            'id': 2,
            'name': 'Eastern European Machine Learning Summer School',
            'small_logo': 'logo_eeml_white.png',
            'large_logo': 'logo_eeml_black.png',
            'domain': 'eeml'
        },
        {
            'id': 3,
            'name': 'Deep Learning Indaba',
            'small_logo': 'logo-32x32-white.png',
            'large_logo': 'indaba-logo-dark.png',
            'domain': 'localhost'
        }
    ])


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

"""Add organisation model

Revision ID: 016571f41a20
Revises: 2873f4f08a4b
Create Date: 2020-01-18 17:50:21.702261

"""

# revision identifiers, used by Alembic.
revision = '016571f41a20'
down_revision = '2873f4f08a4b'

from alembic import op
import sqlalchemy as sa


def upgrade():
    organisation = op.create_table('organisation',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=50), nullable=False),
    sa.Column('small_logo', sa.String(length=100), nullable=False),
    sa.Column('large_logo', sa.String(length=100), nullable=False),
    sa.Column('domain', sa.String(length=100), nullable=False),

    sa.PrimaryKeyConstraint('id')
    )

    op.bulk_insert(organisation,
    [
        {
            'id': 1,
            'name': 'Deep Learning Indaba',
            'small_logo': 'logo-32x32-white.png',
            'large_logo': 'indaba-logo-dark.png',
            'domain': 'deeplearningindaba'
        },
        {
            'id': 2,
            'name': 'Eastern European Machine Learning Summer School',
            'small_logo': 'logo_eeml_white.png',
            'large_logo': 'logo_eeml_black.png',
            'domain': 'eeml'
        },
        {
            'id': 3,
            'name': 'Deep Learning Indaba',
            'small_logo': 'logo-32x32-white.png',
            'large_logo': 'indaba-logo-dark.png',
            'domain': 'localhost'
        }
    ])


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('organisation')
    # ### end Alembic commands ###
Add organisation model  Revision ID: 016571f41a20 Revises: 2873f4f08a4b Create Date: 2020-01-18 17:50:21.702261 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###