Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change memberships_history pkey #3083

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions auth-api/migrations/versions/2024_09_20_aa74003de9d8_.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

"""

from alembic import op
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
Expand Down Expand Up @@ -147,7 +147,7 @@ def upgrade():
sa.Column("modified_by_id", sa.Integer(), autoincrement=False, nullable=True),
sa.Column("version", sa.Integer(), autoincrement=False, nullable=False),
sa.Column("changed", sa.DateTime(), nullable=True),
sa.PrimaryKeyConstraint("id", "version"),
sa.PrimaryKeyConstraint("id", "changed"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new migration to handle this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already changed the key manually. wanted to verify it in dev/test first

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it will remain busted on my computer until I change it or dump the db then haha

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the inconvenience, that migration file already had a few updates, thought no one will notice

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good haha

sqlite_autoincrement=True,
)
with op.batch_alter_table("memberships_history", schema=None) as batch_op:
Expand Down
Loading