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

Failure after creating 2 tables with an inheritance relation #19

Open
DAAAAAAAAAAAAAAAAN opened this issue Jan 7, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@DAAAAAAAAAAAAAAAAN
Copy link
Contributor

Description

trek generate fails when adding two tables that inherit each other. I suppose it's trying to create table2 first, which then refers to table1 which doesn't yet exist.

Steps To Reproduce

  1. Create empty folder and go through trek init
  2. Open the model in pgmodeler
  3. Add schema schemaname
  4. Add table schemaname.table1 and schemaname.table2
  5. Add inheritance relation from table2 to table1
  6. Validate and save.
  7. Run trek generate --stdout

Relevant log output

Failed to run: failed to generate migration statements: failed to generate missing permission statements: failed to apply generated migration: ERROR: relation "schemaname.table1" does not exist (SQLSTATE 42P01)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant