initial import

This commit is contained in:
ultra
2016-12-05 21:22:44 -05:00
commit 66cc8b6ad5
17 changed files with 581 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
"""added hnid column
Revision ID: 131d925693a4
Revises: d1f648fcd62a
Create Date: 2016-12-05 19:12:17.872699
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '131d925693a4'
down_revision = 'd1f648fcd62a'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('found_items', sa.Column('hnid', sa.String(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('found_items', 'hnid')
# ### end Alembic commands ###

Binary file not shown.

View File

@@ -0,0 +1,34 @@
"""create initial state
Revision ID: d1f648fcd62a
Revises:
Create Date: 2016-12-05 18:37:48.117437
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd1f648fcd62a'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
op.create_table('trained_items',
sa.Column('name', sa.String, primary_key=True),
sa.Column('state', sa.Boolean))
op.create_table('found_items',
sa.Column('id', sa.Integer, primary_key=True),
sa.Column('name', sa.String),
sa.Column('url', sa.String, unique=True, index=True),
sa.Column('date', sa.DateTime, index=True),
sa.Column('rating', sa.Float))
pass
def downgrade():
op.drop_table('trained_items')
op.drop_table('found_items')

Binary file not shown.

View File

@@ -0,0 +1,25 @@
"""create initial state
Revision ID: d1f648fcd62a
Revises:
Create Date: 2016-12-05 18:37:48.117437
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd1f648fcd62a'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
pass
def downgrade():
op.drop_table('')

View File

@@ -0,0 +1,28 @@
"""added comment_count column
Revision ID: e07ebf603ff2
Revises: 131d925693a4
Create Date: 2016-12-05 19:49:45.783201
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e07ebf603ff2'
down_revision = '131d925693a4'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('found_items', sa.Column('comment_count', sa.Integer(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('found_items', 'comment_count')
# ### end Alembic commands ###