-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔥 Remove unnecessary invited_user_id logic (#72)
- Loading branch information
1 parent
df0cbec
commit b70eea2
Showing
4 changed files
with
41 additions
and
37 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
backend/app/alembic/versions/c5cc3b0f01d6_remove_invited_user_id_column_and_.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,37 @@ | ||
"""Remove invited_user_id column and relationships | ||
Revision ID: c5cc3b0f01d6 | ||
Revises: a9b76125b71a | ||
Create Date: 2024-05-24 15:47:43.647737 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import sqlmodel.sql.sqltypes | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'c5cc3b0f01d6' | ||
down_revision = 'a9b76125b71a' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('invitation', 'email', | ||
existing_type=sa.VARCHAR(), | ||
nullable=False) | ||
op.drop_constraint('invitation_invited_user_id_fkey', 'invitation', type_='foreignkey') | ||
op.drop_column('invitation', 'invited_user_id') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('invitation', sa.Column('invited_user_id', sa.INTEGER(), autoincrement=False, nullable=True)) | ||
op.create_foreign_key('invitation_invited_user_id_fkey', 'invitation', 'user', ['invited_user_id'], ['id']) | ||
op.alter_column('invitation', 'email', | ||
existing_type=sa.VARCHAR(), | ||
nullable=True) | ||
# ### 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