Hi all,
Is it possible to do a db name change during the course of the
project and then propagate the effect all across the project?
E.g. I started of doing a sample program with db name as
"tests". As the project evolved I decided to change its name to
"biodatas".
" create_table "tests", :force => true do |t|
t.column "name", :string, :limit => 45, :default =>
"", :null => false
t.column "class", :integer, :limit => 10, :default => 0,
:null => false
t.column "address", :string, :limit => 45, :default =>
"", :null =>
false
t.column "city", :string, :limit => 45, :default =>
"", :null => false
end
"
--
With regards
Cherian Thomas,
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Cherian Thomas wrote:> Is it possible to do a db name change during the course of the > project and then propagate the effect all across the project? > > E.g. I started of doing a sample program with db name as > "tests". As the project evolved I decided to change its name to "biodatas".Making a migration with rename_table "tests", "biodatas" will rename the table for you. You''ll have to search-and-replace in order to change mentions of Test to Biodata in your code, unless you''re using an IDE that can do this for you. Chris --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i get u on migration. and about ide. i use rad rails of eclipse.pretty much new to it. does it allow this kind of refactoring? On 12/25/06, Chris Mear <chris-OIzkuoyqg0kAvxtiuMwx3w@public.gmane.org> wrote:> > > Cherian Thomas wrote: > > Is it possible to do a db name change during the course of > the > > project and then propagate the effect all across the project? > > > > E.g. I started of doing a sample program with db name as > > "tests". As the project evolved I decided to change its name to > "biodatas". > > Making a migration with > > rename_table "tests", "biodatas" > > will rename the table for you. > > You''ll have to search-and-replace in order to change mentions of Test > to Biodata in your code, unless you''re using an IDE that can do this > for you. > > Chris > > > > >-- With regards Cherian Thomas, Mobile: 9886782481 --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---