We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
{ "name": "1_initial_schema", "operations": [ { "create_table": { "columns": [ { "name": "id", "nullable": false, "pk": true, "type": "uuid", "unique": true } ], "name": "lang" } }, { "create_table": { "columns": [ { "name": "id", "nullable": false, "pk": true, "type": "uuid", "unique": true }, { "name": "lang", "nullable": false, "pk": true, "references": { "column": "id", "name": "translation_lang_lang_id", "on_delete": "RESTRICT", "table": "lang" }, "type": "uuid", "unique": false } ], "name": "translation" } } ] }
When I try to reference a table added within the same migration I get the following error:
Error: migration is invalid: column reference to column "lang" in table "translation" is invalid: table "lang" does not exist
This is really misleading and results from the way temporary tables are created during a migration.
I think pgroll should ccount for the temporary table names and create the references using temporary table names.
The text was updated successfully, but these errors were encountered:
This issue also means that it is not always possible to encode all desired changes in a single migration.
Sorry, something went wrong.
Hi @ilyakooo0 👋 , thanks for opening the issue.
The inability to reference objects created in earlier operations in the same migration is tracked in #239 as part of the v1 milestone.
It is a significant limitation and one that will need to be removed before a v1.
No branches or pull requests
When I try to reference a table added within the same migration I get the following error:
This is really misleading and results from the way temporary tables are created during a migration.
I think pgroll should ccount for the temporary table names and create the references using temporary table names.
The text was updated successfully, but these errors were encountered: