aboutsummaryrefslogtreecommitdiff
path: root/migrations/versions
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2017-05-23 23:33:17 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2017-05-23 23:33:17 +0200
commitf097e2a9eba974b02da0130a4678dd6b9e0e84ea (patch)
tree3b152f4e40f65c0a37aaae08e0f5020f784f8c99 /migrations/versions
parentAdded database migration script. (diff)
downloadnewspipe-f097e2a9eba974b02da0130a4678dd6b9e0e84ea.tar.gz
newspipe-f097e2a9eba974b02da0130a4678dd6b9e0e84ea.tar.bz2
newspipe-f097e2a9eba974b02da0130a4678dd6b9e0e84ea.zip
fixed migration script
Diffstat (limited to 'migrations/versions')
-rw-r--r--migrations/versions/b329a1a7366f_add_new_tables_for_the_bookmarks_and_.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/migrations/versions/b329a1a7366f_add_new_tables_for_the_bookmarks_and_.py b/migrations/versions/b329a1a7366f_add_new_tables_for_the_bookmarks_and_.py
index e71b1d54..8f2b015c 100644
--- a/migrations/versions/b329a1a7366f_add_new_tables_for_the_bookmarks_and_.py
+++ b/migrations/versions/b329a1a7366f_add_new_tables_for_the_bookmarks_and_.py
@@ -26,17 +26,6 @@ def upgrade():
ondelete='CASCADE'),
sa.PrimaryKeyConstraint('text', 'article_id')
)
- op.create_table('bookmark_tag',
- sa.Column('id', sa.Integer(), nullable=False),
- sa.Column('text', sa.String(), nullable=False),
- sa.Column('user_id', sa.Integer(), nullable=False),
- sa.Column('bookmark_id', sa.Integer(), nullable=False),
- sa.ForeignKeyConstraint(['bookmark_id'], ['bookmark.id'],
- ondelete='CASCADE'),
- sa.ForeignKeyConstraint(['user_id'], ['user.id'],
- ondelete='CASCADE'),
- sa.PrimaryKeyConstraint('id')
- )
op.create_table('bookmark',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('href', sa.String(), default=""),
@@ -50,6 +39,17 @@ def upgrade():
ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id')
)
+ op.create_table('bookmark_tag',
+ sa.Column('id', sa.Integer(), nullable=False),
+ sa.Column('text', sa.String(), nullable=False),
+ sa.Column('user_id', sa.Integer(), nullable=False),
+ sa.Column('bookmark_id', sa.Integer(), nullable=False),
+ sa.ForeignKeyConstraint(['bookmark_id'], ['bookmark.id'],
+ ondelete='CASCADE'),
+ sa.ForeignKeyConstraint(['user_id'], ['user.id'],
+ ondelete='CASCADE'),
+ sa.PrimaryKeyConstraint('id')
+ )
def downgrade():
bgstack15