diff options
Diffstat (limited to 'migrations')
-rw-r--r-- | migrations/versions/b329a1a7366f_add_new_tables_for_the_bookmarks_and_.py | 22 |
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(): |