From 78dbf88a073afac6ec0218b7e0ce638f03e87867 Mon Sep 17 00:00:00 2001 From: Andrew Bolyachevets Date: Mon, 21 Oct 2024 09:19:20 -0700 Subject: [PATCH] change memberships_history pkey (#3083) --- auth-api/migrations/versions/2024_09_20_aa74003de9d8_.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth-api/migrations/versions/2024_09_20_aa74003de9d8_.py b/auth-api/migrations/versions/2024_09_20_aa74003de9d8_.py index a20b4a13bc..01d592db99 100644 --- a/auth-api/migrations/versions/2024_09_20_aa74003de9d8_.py +++ b/auth-api/migrations/versions/2024_09_20_aa74003de9d8_.py @@ -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. @@ -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"), sqlite_autoincrement=True, ) with op.batch_alter_table("memberships_history", schema=None) as batch_op: