-
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.
added birthdate and gender fields for user.
- Loading branch information
1 parent
0df0f0a
commit 3423f9e
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
alembic/versions/669a669eb646_added_birthdate_and_gender_to_users_.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 @@ | ||
"""Added birthdate and gender to users table. | ||
Revision ID: 669a669eb646 | ||
Revises: b949ec822291 | ||
Create Date: 2023-12-04 12:20:10.999671 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '669a669eb646' | ||
down_revision = 'b949ec822291' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint('forgot_password_identifier_key', 'forgot_password', type_='unique') | ||
op.add_column('users', sa.Column('birthdate', sa.DateTime(), nullable=True)) | ||
op.add_column('users', sa.Column('gender', sa.Text(), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('users', 'gender') | ||
op.drop_column('users', 'birthdate') | ||
op.create_unique_constraint('forgot_password_identifier_key', 'forgot_password', ['identifier']) | ||
# ### 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