Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

hstore indexes not saved to schema.rb correctly. #120

Open
urkle opened this issue Feb 18, 2014 · 5 comments
Open

hstore indexes not saved to schema.rb correctly. #120

urkle opened this issue Feb 18, 2014 · 5 comments

Comments

@urkle
Copy link

urkle commented Feb 18, 2014

The hstore indexes are not saved to schema.rb correctly..

instead of saving an add_hstore_index line it simply creates an add_index line, thus the 'gin' index isn't created.

A related issue is that the add_hstore_index :table, :column, :type => :gin doesn't work. (the AR method add_index_options doesn't support a :type option, only :name and :unique).

We are running Rails 3.2.x (going to 4.0 right now isn't an option.. though it's on our roadmap)

@diogob
Copy link
Owner

diogob commented Feb 18, 2014

You could work around using an SQL schema for now. If yu want to keep the schema.rb you can check this gem (which adds the index kind feature): https://github.com/lomba/schema_plus.

@urkle
Copy link
Author

urkle commented Feb 18, 2014

Is this something that can be easily added to this gem? Or does it require monkey'ing w/ the core ActiveRecord?

@diogob
Copy link
Owner

diogob commented Feb 18, 2014

I'm not sure, I suppose it does need monkey patching though.

@urkle
Copy link
Author

urkle commented Feb 18, 2014

I'm looking at the schema_plus.. it looks interesting..

@urkle
Copy link
Author

urkle commented Feb 18, 2014

(I could maybe sneak in some views and SPs to make reporting easier.. WOOT!)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants