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

How to customize Table name in Cequel? #305

Closed
rtatavarty opened this issue Jun 21, 2016 · 2 comments
Closed

How to customize Table name in Cequel? #305

rtatavarty opened this issue Jun 21, 2016 · 2 comments

Comments

@rtatavarty
Copy link

For a Cequel record/schema, the name is generated by rake cequel:migrate. But how do we assign a name in the model definition?

I tried the following but it did not work (Cequel 1.7.0):

class MyInfo
  include Cequel::Record

  key :name, :text
  column :info, :text

  self.table_name = "my_info_2" #<<< need to set a custom name

end

Note: Also posted on SO - not sure which place is appropriate for a question like this.

@pezra
Copy link
Contributor

pezra commented Jun 22, 2016

The self.table_name = ... syntax works for the current version (1.9.1). A lot of improvements have been made in the 9 months since 1.7.0 was released. Any chance you could upgrade?

@rtatavarty
Copy link
Author

Sure, will upgrade to the latest stable. Thanks!

@pezra pezra closed this as completed Oct 2, 2016
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