Forum: Ruby on Rails create databases with rake

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.
Enrico T. (Guest)
on 2006-05-04 19:37
(Received via mailing list)
hi,
is there a way to create the database (say development and or
production) specified in database.yml with rake?
thanks,
Enrico

--
"The only thing necessary for the triumph of evil
is for good men to do nothing"
 Edmund Burke
Roberto S. (Guest)
on 2006-05-04 19:43
(Received via mailing list)
A production database usually is much more than just the create
statement.
For testing and development I use sqlite, where no db creation is
necessary,
when you first start to use it it gets created automatically.
Andrew H. Johnson (Guest)
on 2006-05-04 19:46
(Received via mailing list)
Have you looked at the rake migrate utilities.

~A
Enrico T. (Guest)
on 2006-05-04 19:59
(Received via mailing list)
Isn't migrations assuming the DB is already there?
I'm aware of the migrating functionality on tables and data, there's
an execute method able to execute the query you pass but still...
isn't it assuming the DB is alredy in place?
I know it's just a matter of typing few words, I was just wondering
about a rake way to do it.
thanks


--
"The only thing necessary for the triumph of evil
is for good men to do nothing"
 Edmund Burke
Takashi Okamoto (Guest)
on 2006-05-04 21:24
(Received via mailing list)
you can initially import your schema with:

rake db_schema_import

but i'm not sure about the actual creation of DB.

-tak.
Didier V. (Guest)
on 2006-05-08 23:30
(Received via mailing list)
Takashi Okamoto a écrit :
> you can initially import your schema with:
>
> rake db_schema_import
>
> but i'm not sure about the actual creation of DB.
>
> -tak.
>

IMHO, db_schema_import task does work only for SQLite. For MySQL I
always have to create "manually" the empty schemas needed (dev, test,
prod).
What about other DBMS ? I don't know, a try costs nothing ...

Didier
This topic is locked and can not be replied to.