Skip to content

Currently no support for indexes that utilize STORING #282

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

Open
2 tasks
MarcusRiemer opened this issue Jul 28, 2023 · 0 comments
Open
2 tasks

Currently no support for indexes that utilize STORING #282

MarcusRiemer opened this issue Jul 28, 2023 · 0 comments

Comments

@MarcusRiemer
Copy link

Currently it is only possible to specify the columns that need to be stored in an index using the regular add_index method. We therefore resort to execute statements like the following:

CREATE INDEX "users_lastname_asc"
ON users (last_name ASC)
STORING (first_name, company_id);

This will however add an index declaration to the schema.rb that reads as follow:

t.index ["last_name", "first_name", "company_id"], name: "users_lastname_asc"

This seems like an implementation detail leaking into the schema.rb: Obviously the stored columns are part of the index, but to the best of my understanding they are not contributing to the lookup data structures. So the schema.rb is now expressing something different than the actual migration.

tl;dr: Please ...

  • Support STORING in add_index
  • Support indices created using STORING in schema.rb
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

No branches or pull requests

1 participant