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

fix: Add id column to association tables and restore unique constraints #1818

Merged
merged 9 commits into from
Feb 1, 2024

Conversation

fregataa
Copy link
Member

@fregataa fregataa commented Jan 3, 2024

follow-up #576

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • Installer updates including:
    • Fixtures for db schema changes
    • New mandatory config options
  • Update of end-to-end CLI integration tests in ai.backend.test
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation

@fregataa fregataa added this to the 23.09 milestone Jan 3, 2024
@fregataa fregataa self-assigned this Jan 3, 2024
@github-actions github-actions bot added comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated size:S 10~30 LoC labels Jan 3, 2024
@github-actions github-actions bot added size:L 100~500 LoC and removed size:S 10~30 LoC labels Jan 3, 2024
@fregataa fregataa changed the title fix: Restore user-group unique constraint in association_groups_users table fix: Add id column to association tables and restore unique constraints Jan 3, 2024
@fregataa fregataa requested review from kyujin-cho and adrysn January 4, 2024 03:52
@fregataa fregataa added the urgency:3 Must be finished within a certain time frame. label Jan 5, 2024
@achimnol achimnol enabled auto-merge February 1, 2024 04:56
@achimnol achimnol added this pull request to the merge queue Feb 1, 2024
Merged via the queue into main with commit 6ea29f6 Feb 1, 2024
26 checks passed
@achimnol achimnol deleted the fix/user-group-unique-constraint branch February 1, 2024 05:04
fregataa added a commit that referenced this pull request Feb 1, 2024
…ints (#1818)

Backported-from: main (24.03)
Backported-to: 23.09
Co-authored-by: Joongi Kim <[email protected]>
@achimnol
Copy link
Member

achimnol commented Feb 1, 2024

After applying this commit, alembic upgrade head gives:

sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.ProgrammingError: <class 'asyncpg.exceptions.InvalidTableDefinitionError'>: multiple primary keys for table "association_groups_users" are not allowed

Please check out this! @fregataa

fregataa added a commit that referenced this pull request Feb 4, 2024
kyujin-cho pushed a commit that referenced this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated size:L 100~500 LoC urgency:3 Must be finished within a certain time frame.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants