Migration commands -- create a SQL Server production DB?


#1

Hallo – could anyone tell me how I use Migrations (which my existing
development schema is implemented with) to create the production
database for deployment?
The target DB is a SQL Server database – I don’t know if that’s an
issue – I seem to remember reading that SQL Server is supported now.
Oh, yeah – SQL Server was not my choice!
But what I seem totally unable to find is a list of the commands that
script/migrate accepts.
Cheers,
doug.


#2

But what I seem totally unable to find is a list of the commands that
script/migrate accepts.

http://api.rubyonrails.com/classes/ActiveRecord/Migration.html

dorian


I do things for love or money


#3

Hi – cheers for that. Whilst it has plenty on writing the actual
migration, it’s running them that I need to know about.
The link you left mentions “rake migrate” and how to crete a migration
(which I’ve been using), not what commands would apply the migrations to
a database other than my development database.
In another article I found this:

rake db_schema_import â?? imports the schema dumped using db_schema_dump

rake migrate â?? migrates a database to the current version

rake migrate VERSION={X} â?? migrates a database to a specific version

rake environment RAILS_ENV=production migrate â?? migrates the

production database to the current version

rake schema_generator â?? products a .SQL file for each supported

database platform (not everything is currently supported)

This is about as much detail as I have been able to find.
I guess I’ll go ahead & experiment with this, but I was hoping that
somewhere there might be a guide to running migrations (or maybe a rake
in rails guide?) that would explain it all in detail to me, so that I
could have a little more confidence in what I’m doing.
It’s all good learnin’, anyhow…
Cheers again,
doug.