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

Application Model: Postgres compatible migrations #1869

Merged
merged 3 commits into from
Mar 22, 2023

Conversation

Pezmc
Copy link
Contributor

@Pezmc Pezmc commented Mar 22, 2023

Description

The migrations introduced in #1813 don't run in postgres.

This PR fixes that.

Related Issue(s)

#1735

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@Pezmc Pezmc requested a review from knolleary March 22, 2023 05:54
@knolleary
Copy link
Member

Testing against Postgres had fallen off my todo list when we chose to park 1813 in 1.5 - and I forgot to add it as an explicit todo. Apols.

However, these changes now do not run on sqlite...

Failed to start: TypeError: Cannot read properties of undefined (reading 'id')

I'll investigate and update this PR with a cross-db working migration.

@knolleary
Copy link
Member

Have pushed the fix to make the migration work across both sqlite and postgres - annoyingly they return different formatted results for the insert.

Have tested locally against both dbs.

Copy link
Member

@knolleary knolleary left a comment

Choose a reason for hiding this comment

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

Am approving the general changes - @Pezmc please review the last commit and then merge if you're 👍🏻

@Pezmc Pezmc merged commit cc05f54 into feat-1735-application-model Mar 22, 2023
@Pezmc Pezmc deleted the fix-1735-postgres-migration branch March 22, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants