-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'multiple-users-working'
- Loading branch information
Showing
5 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
migrations/versions/9bd71ed6ccff_remove_unique_constraint_name_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"""Remove unique constraint name for note title | ||
Revision ID: 9bd71ed6ccff | ||
Revises: c440f31aff28 | ||
Create Date: 2021-02-27 15:10:54.803203 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import app.model_types | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '9bd71ed6ccff' | ||
down_revision = 'c440f31aff28' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
with op.batch_alter_table('note', schema=None) as batch_op: | ||
batch_op.drop_constraint('title_uniq', type_='unique') | ||
|
||
|
||
def downgrade(): | ||
pass |
27 changes: 27 additions & 0 deletions
27
migrations/versions/c440f31aff28_add_unique_constraint_name_for_note_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Add named unique constraint name for note title | ||
Revision ID: c440f31aff28 | ||
Revises: 7bd1ee1840ca | ||
Create Date: 2021-02-27 08:59:27.748780 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import app.model_types | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'c440f31aff28' | ||
down_revision = '7bd1ee1840ca' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
with op.batch_alter_table('note', schema=None) as batch_op: | ||
batch_op.create_unique_constraint('title_uniq', ['title']) | ||
|
||
|
||
def downgrade(): | ||
with op.batch_alter_table('note', schema=None) as batch_op: | ||
pass |