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

Constraint migration generations ignore prefixes #270

Open
cschmatzler opened this issue May 6, 2024 · 0 comments
Open

Constraint migration generations ignore prefixes #270

cschmatzler opened this issue May 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cschmatzler
Copy link

cschmatzler commented May 6, 2024

Describe the bug
The AlterDeferrability operation does not respect schema prefixes, which results in broken migrations.

"execute(\"ALTER TABLE #{table} alter CONSTRAINT #{name} DEFERRABLE INITIALLY IMMEDIATE\");"

To Reproduce

  1. Create a resource with a prefix on data layer level. Generate migrations.
  2. Create a resource that has a foreign key on table from #1. Generate migrations.
  3. Change the name of table 1. Generate migrations.
  4. The migration fails with "relation does not exist" because the prefix is missing.

Expected behavior
Prefix is added to the migration.

** Runtime

  • Elixir version 1.16.2
  • Erlang version 26.2.4
  • OS macOS 14.4.1
  • Ash version
    {:ash_postgres, "== 2.0.0-rc.15"}
@cschmatzler cschmatzler added bug Something isn't working needs review labels May 6, 2024
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
Status: Someday
Development

No branches or pull requests

2 participants