From ea21b23b92fec1eb5fcc180f8bc054151216538b Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 16 Jan 2009 04:34:34 +0000 Subject: * Tabs -> Spaces in guides templates * Move inline css to a file --- railties/doc/guides/html/migrations.html | 386 +++++++++---------------------- 1 file changed, 109 insertions(+), 277 deletions(-) (limited to 'railties/doc/guides/html/migrations.html') diff --git a/railties/doc/guides/html/migrations.html b/railties/doc/guides/html/migrations.html index c4c2591234..0a8b85c77c 100644 --- a/railties/doc/guides/html/migrations.html +++ b/railties/doc/guides/html/migrations.html @@ -1,283 +1,115 @@ - - Migrations - - - - - + + Migrations + + + + - - -
- - - -
-

Migrations

-
+ + +
+ + + +
+

Migrations

+

Migrations are a convenient way for you to alter your database in a structured and organised manner. You could edit fragments of SQL by hand but you would then be responsible for telling other developers that they need to go and run it. You’d also have to keep track of which changes need to be run against the production machines next time you deploy. Active Record tracks which migrations have already been run so all you have to do is update your source and run rake db:migrate. Active Record will work out which migrations should be run. It will also update your db/schema.rb file to match the structure of your database.

Migrations also allow you to describe these transformations using Ruby. The great thing about this is that (like most of Active Record’s functionality) it is database independent: you don’t need to worry about the precise syntax of CREATE TABLE any more that you worry about variations on SELECT * (you can drop down to raw SQL for database specific features). For example you could use SQLite3 in development, but MySQL in production.

@@ -893,7 +725,7 @@ September 14, 2008: initial version by Frederi
-
-
+
+
-- cgit v1.2.3