-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #250 from kmc-jp/fix-tag-name-collation
タグ名のひらがな・カタカナを区別して保存する
- Loading branch information
Showing
3 changed files
with
46 additions
and
3 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
30 changes: 30 additions & 0 deletions
30
api/src/migration/versions/4f308d092386_change_tag_name_collation_to_utf8mb4_.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,30 @@ | ||
"""change tag name collation to utf8mb4_general_ci | ||
Revision ID: 4f308d092386 | ||
Revises: aa084f2c60f6 | ||
Create Date: 2024-01-23 21:18:51.543256 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '4f308d092386' | ||
down_revision = 'aa084f2c60f6' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('tag', 'canonical_name', type_=sa.types.VARCHAR(255, collation='utf8mb4_general_ci')) | ||
op.alter_column('tag', 'name', type_=sa.types.VARCHAR(255, collation='utf8mb4_general_ci')) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('tag', 'canonical_name', type_=sa.types.VARCHAR(255)) | ||
op.alter_column('tag', 'name', type_=sa.types.VARCHAR(255)) | ||
# ### end Alembic commands ### |
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