-
-
Notifications
You must be signed in to change notification settings - Fork 21
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 #745 from scidsg/re-add-index-to-user-model
re-add stripe_customer_id index to User model
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""rename index | ||
Revision ID: 06b343c38386 | ||
Revises: 0b1321c8de13 | ||
Create Date: 2024-11-09 10:32:09.966628 | ||
""" | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "06b343c38386" | ||
down_revision = "0b1321c8de13" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.execute( | ||
sa.text("ALTER INDEX idx_users_stripe_customer_id RENAME TO ix_users_stripe_customer_id") | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.execute( | ||
sa.text("ALTER INDEX ix_users_stripe_customer_id RENAME TO idx_users_stripe_customer_id") | ||
) |
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