aboutsummaryrefslogtreecommitdiff
path: root/migrations/versions
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-08 14:39:47 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-08 14:39:47 +0100
commit2d72f44a90a76fe7450e59fdfdf4d42f44b9cd96 (patch)
tree39895c10f68cf0b13d957073268769d04aa924a0 /migrations/versions
parentCloses section HTML tag. (diff)
downloadnewspipe-2d72f44a90a76fe7450e59fdfdf4d42f44b9cd96.tar.gz
newspipe-2d72f44a90a76fe7450e59fdfdf4d42f44b9cd96.tar.bz2
newspipe-2d72f44a90a76fe7450e59fdfdf4d42f44b9cd96.zip
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)
Diffstat (limited to 'migrations/versions')
-rw-r--r--migrations/versions/2c5cc05216fa_adding_tag_handling_capacities.py30
1 files changed, 30 insertions, 0 deletions
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')
bgstack15