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

Create index helpers for models #27

Closed
justinperkins opened this issue Apr 13, 2018 · 3 comments
Closed

Create index helpers for models #27

justinperkins opened this issue Apr 13, 2018 · 3 comments

Comments

@justinperkins
Copy link
Collaborator

Since the partitioned tables will/can get created outside the scope of a migration, it makes sense to add those helper methods (add_index) to the model helpers.

This would compliment the existing helpers to manage creating partitioned tables, like "create_partition".

@rkrage
Copy link
Owner

rkrage commented Apr 23, 2018

Sorry, I've been crazy busy lately. I'm currently working on changing some APIs around and making things more consistent. I'll make sure this is included

@justinperkins
Copy link
Collaborator Author

I'm working on abstracting all of my model-based needs into a concern, was going to propose it as a PR once I worked everything out. For the time being, this works perfectly fine in the model ...

self.connection.add_index my_partition_name, [...], name: "..."

@rkrage
Copy link
Owner

rkrage commented Apr 26, 2018

Yeah I think it would definitely be a good idea to break up some of the model functionality into discrete concerns. I was playing around with some pretty weird patterns when I initially wrote this thing too. There's a fair amount of cleanup that I want to do before releasing a 1.0 version

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

2 participants