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

[Postgres] error: could not find public.table_name index index_name column id 0 #345

Open
mikestefanello opened this issue Feb 4, 2022 · 4 comments

Comments

@mikestefanello
Copy link

An index with any conversion on it (ie, lower, least, etc) will cause the generation to fail:

error: could not find public.table_name index index_name column id 0

@kenshaw
Copy link
Member

kenshaw commented Feb 5, 2022

@mikestefanello Appreciate you finding this. To simplify things for the xo devs (ie, me), could you share a simplified create enum and the conversion you're using on the column with the corresponding create table statement? Much appreciated.

@mikestefanello
Copy link
Author

CREATE UNIQUE INDEX on my_table USING BTREE (some_id, lower(title)) WHERE archived_at IS NULL;

CREATE UNIQUE INDEX ON my_table ( LEAST( one_id, another_id ), GREATEST( one_id, another_id ), typ );

@kenshaw
Copy link
Member

kenshaw commented Feb 7, 2022

@mikestefanello Thanks. I'll look into this and try to get it fixed.

@SC4RECOIN
Copy link

any work-around for this?

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

3 participants