Yup thought of what you said already but dont like it because already
my app has become huge:
1. almost 14 reference tables and 10 app tables.
2. 4 -5 deployments

Every time I change some reference table with global impacts. I dont
want a new id because other application tables across all the
deployments might be using that particular reference table id. So I
want to fix up my reference table ids permanently by switching off
auto increment and taking control over it.

Of course app tables i will keep auto increment on.

This way any ref table change, I will write 1 migration to delete all
refs tables and rewrite them ... increasing the deployment window but
simplifying how to steps.

On Nov 28, 9:51 am, Colin Law <[email protected]> wrote:
> 2009/11/28 Ritvvij <[email protected]>:
>
> > Hello
>
> > I want to create a table with ID column but dont want auto increment
> > used. (columns in table are id and string) I am using mysql. Can you
> > help me write the create migration?
>
> Why do you not want auto increment?  If it is because you want control
> of an id field for something like a product code or user number then
> it is probably easier to let Rails use the normal auto increment id
> field and add another one of your own, product_code or whatever it is,
> that you can manipulate as you wish without having to go against the
> Rails conventions.  This is more likely to give you a peaceful life.
>
> Colin

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to