Sqlite and migrations question


#1

I am attempting to start my new application using the migrations feature
of rails. I’m not new to databases but new to SQLite.

My question is that starting with noting it appears I have to create a
table in the SQLite console and then use migrations to delete that table
and add more tables. Surely it should be possible to create a blank
SQLite database that I can then use migrations to do all of my database
table creation.


#2

On 2/14/06, James W. removed_email_address@domain.invalid wrote:

I am attempting to start my new application using the migrations feature
of rails. I’m not new to databases but new to SQLite.

My question is that starting with noting it appears I have to create a
table in the SQLite console and then use migrations to delete that table
and add more tables. Surely it should be possible to create a blank
SQLite database that I can then use migrations to do all of my database
table creation.

I had this same question a couple of days ago, and couldn’t find
anything relevant in the first 15 minutes or so. It would be cool if
the initial migration could create the SQLite database if it didn’t
already exist.


#3

I assume you’ve watched the Migrations screencast.

http://media.rubyonrails.org/video/migrations.mov

For SQLite, you just do a rake db_schema_dump and the database is
created for you, empty.

Michael T.