Skip to content
This repository
Browse code

Revert "Included w3c_validators gem and modified Migrations file"

This reverts commit 1028226.

Reason: No code changes can be done in docrails.
  • Loading branch information...
commit 7744177919526a97bda1c08bf46e7250ce156347 1 parent b367f96
Vijay Dev vijaydev authored

Showing 2 changed files with 12 additions and 28 deletions. Show diff stats Hide diff stats

  1. +0 1  Gemfile
  2. +12 27 railties/guides/source/migrations.textile
1  Gemfile
@@ -11,7 +11,6 @@ end
11 11 gem "coffee-script"
12 12 gem "sass"
13 13 gem "uglifier", ">= 1.0.0"
14   -gem "w3c_validators"
15 14
16 15 gem "rake", ">= 0.8.7"
17 16 gem "mocha", ">= 0.9.8"
39 railties/guides/source/migrations.textile
Source Rendered
@@ -117,33 +117,6 @@ Occasionally you will make a mistake when writing a migration. If you have alrea
117 117
118 118 In general editing existing migrations is not a good idea: you will be creating extra work for yourself and your co-workers and cause major headaches if the existing version of the migration has already been run on production machines. Instead you should write a new migration that performs the changes you require. Editing a freshly generated migration that has not yet been committed to source control (or more generally which has not been propagated beyond your development machine) is relatively harmless.
119 119
120   -h4. Supported Types
121   -
122   -Active Record supports the following types:
123   -
124   -* +:primary_key+
125   -* +:string+
126   -* +:text+
127   -* +:integer+
128   -* +:float+
129   -* +:decimal+
130   -* +:datetime+
131   -* +:timestamp+
132   -* +:time+
133   -* +:date+
134   -* +:binary+
135   -* +:boolean+
136   -
137   -These will be mapped onto an appropriate underlying database type, for example with MySQL +:string+ is mapped to +VARCHAR(255)+. You can create columns of types not supported by Active Record when using the non-sexy syntax, for example
138   -
139   -<ruby>
140   -create_table :products do |t|
141   - t.column :name, 'polygon', :null => false
142   -end
143   -</ruby>
144   -
145   -This may however hinder portability to other databases.
146   -
147 120 h3. Creating a Migration
148 121
149 122 h4. Creating a Model
@@ -288,6 +261,18 @@ end
288 261
289 262 will append +ENGINE=BLACKHOLE+ to the SQL statement used to create the table (when using MySQL the default is +ENGINE=InnoDB+).
290 263
  264 +The types supported by Active Record are +:primary_key+, +:string+, +:text+, +:integer+, +:float+, +:decimal+, +:datetime+, +:timestamp+, +:time+, +:date+, +:binary+, +:boolean+.
  265 +
  266 +These will be mapped onto an appropriate underlying database type, for example with MySQL +:string+ is mapped to +VARCHAR(255)+. You can create columns of types not supported by Active Record when using the non-sexy syntax, for example
  267 +
  268 +<ruby>
  269 +create_table :products do |t|
  270 + t.column :name, 'polygon', :null => false
  271 +end
  272 +</ruby>
  273 +
  274 +This may however hinder portability to other databases.
  275 +
291 276 h4. Changing Tables
292 277
293 278 A close cousin of +create_table+ is +change_table+, used for changing existing tables. It is used in a similar fashion to +create_table+ but the object yielded to the block knows more tricks. For example

0 comments on commit 7744177

Please sign in to comment.
Something went wrong with that request. Please try again.