# Migration commands -- create a SQL Server production DB?

**URL:** <https://www.ruby-forum.com/t/migration-commands-create-a-sql-server-production-db/56047>\
**Category:** Rails\
**Created:** [March 27, 2006, 5:14pm UTC](https://www.ruby-forum.com/t/migration-commands-create-a-sql-server-production-db/56047 "2006-03-27T17:14:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![biot023](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@biot023](https://www.ruby-forum.com/u/biot023)\
**Post date:** [March 27, 2006, 5:14pm UTC](https://www.ruby-forum.com/t/migration-commands-create-a-sql-server-production-db/56047/1 "2006-03-27T17:14:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![biot023](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@biot023](https://www.ruby-forum.com/u/biot023)\
**Post date:** [March 28, 2006, 5:24am UTC](https://www.ruby-forum.com/t/migration-commands-create-a-sql-server-production-db/56047/2 "2006-03-28T05:24:58Z")

</div>

> 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](http://api.rubyonrails.com/classes/ActiveRecord/Migration.html)

dorian

–  
I do things for love or money

---

<div class="post-metadata">

**Author:** ![biot023](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@biot023](https://www.ruby-forum.com/u/biot023)\
**Post date:** [March 28, 2006, 10:45am UTC](https://www.ruby-forum.com/t/migration-commands-create-a-sql-server-production-db/56047/3 "2006-03-28T10:45:47Z")

</div>

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.
