Forum: Ruby on Rails Change Database Name

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dan W. (Guest)
on 2009-01-28 19:33
Hi,

I'd like to change the name of the database for an app I have in
production (the current name is too ambiguous). As I see it I will need
to change the database.yml file and the database name in mysql. Is there
anything else? A better way? Suggestions?

I want to be on the cautious side, for obvious reasons.

Thanks.
Matt H. (Guest)
on 2009-01-28 19:51
(Received via mailing list)
Dan Weaver wrote:
> Hi,
>
> I'd like to change the name of the database for an app I have in
> production (the current name is too ambiguous). As I see it I will need
> to change the database.yml file and the database name in mysql. Is there
> anything else? A better way? Suggestions?
>
> I want to be on the cautious side, for obvious reasons.
>
> Thanks.

You could copy the database to the new name, and then change
database.yml.

Then you can delete the original database without any downtime.

HTH

Matt
Dan W. (Guest)
on 2009-01-28 19:55
Matt H. wrote:
>
> You could copy the database to the new name, and then change
> database.yml.
>
> Then you can delete the original database without any downtime.
>
> HTH
>
> Matt

Good suggestion, thank you.
This topic is locked and can not be replied to.