From 2d72f44a90a76fe7450e59fdfdf4d42f44b9cd96 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 8 Nov 2016 14:39:47 +0100 Subject: various improvements to the crawler (better use of coroutines, test if an article should be updated). tags are now retrieved for the k-means clustering (previously achived with the content of articles) --- .../2c5cc05216fa_adding_tag_handling_capacities.py | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 migrations/versions/2c5cc05216fa_adding_tag_handling_capacities.py (limited to 'migrations') diff --git a/migrations/versions/2c5cc05216fa_adding_tag_handling_capacities.py b/migrations/versions/2c5cc05216fa_adding_tag_handling_capacities.py new file mode 100644 index 00000000..f9559fe3 --- /dev/null +++ b/migrations/versions/2c5cc05216fa_adding_tag_handling_capacities.py @@ -0,0 +1,30 @@ +"""adding tag handling capacities + +Revision ID: 2c5cc05216fa +Revises: be2b8b6f33dd +Create Date: 2016-11-08 07:41:13.923531 + +""" + +# revision identifiers, used by Alembic. +revision = '2c5cc05216fa' +down_revision = 'be2b8b6f33dd' +branch_labels = None +depends_on = None + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + op.create_table('tag', + sa.Column('text', sa.String(), nullable=False), + sa.Column('article_id', sa.Integer(), nullable=False), + sa.ForeignKeyConstraint(['article_id'], ['article.id'], + ondelete='CASCADE'), + sa.PrimaryKeyConstraint('text', 'article_id') + ) + + +def downgrade(): + op.drop_table('tag') -- cgit