<filename>migrations/versions/8766c8da5127_initial_migrate.py
"""initial migrate

Revision ID: 8766c8da5127
Revises: 
Create Date: 2020-08-28 13:02:10.720264

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('comments',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('username', sa.String(length=100), nullable=False),
    sa.Column('comment', sa.String(length=700), nullable=False),
    sa.Column('blog_id', sa.Integer(), nullable=False),
    sa.Column('created_on', sa.DateTime(), nullable=True),
    sa.Column('likes', sa.Integer(), autoincrement=True, nullable=True),
    sa.Column('dislikes', sa.Integer(), autoincrement=True, nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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

<filename>migrations/versions/8766c8da5127_initial_migrate.py
"""initial migrate

Revision ID: 8766c8da5127
Revises: 
Create Date: 2020-08-28 13:02:10.720264

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('comments',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('username', sa.String(length=100), nullable=False),
    sa.Column('comment', sa.String(length=700), nullable=False),
    sa.Column('blog_id', sa.Integer(), nullable=False),
    sa.Column('created_on', sa.DateTime(), nullable=True),
    sa.Column('likes', sa.Integer(), autoincrement=True, nullable=True),
    sa.Column('dislikes', sa.Integer(), autoincrement=True, nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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

initial migrate  Revision ID: 8766c8da5127 Revises:  Create Date: 2020-08-28 13:02:10.720264 # 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 ###