This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
-
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.
Use a single field for a user's personal name
Ref #18
- Loading branch information
1 parent
4945cb4
commit 33e8c10
Showing
7 changed files
with
39 additions
and
12 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
migrate/versions/2021_07_01_fba3c5e8ab83_single_field_for_user_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,32 @@ | ||
"""Single field for user name | ||
Revision ID: fba3c5e8ab83 | ||
Revises: 249e24966335 | ||
Create Date: 2021-07-01 10:37:02.780672 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'fba3c5e8ab83' | ||
down_revision = '249e24966335' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic ### | ||
op.add_column('user', sa.Column('name', sa.String(), nullable=True)) | ||
op.drop_column('user', 'given_name') | ||
op.drop_column('user', 'family_name') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic ### | ||
op.add_column('user', sa.Column('family_name', sa.VARCHAR(), autoincrement=False, nullable=True)) | ||
op.add_column('user', sa.Column('given_name', sa.VARCHAR(), autoincrement=False, nullable=True)) | ||
op.drop_column('user', 'name') | ||
# ### 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
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
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