mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
revises a RDoc example to make it idiomatic
The force flag suggests the original was probably copied from some db/schema.rb. Thanks to Josh Susser for spotting and reporting this.
This commit is contained in:
parent
0adcf6d90e
commit
27ca9151f1
1 changed files with 8 additions and 8 deletions
|
@ -190,16 +190,16 @@ module ActiveRecord
|
||||||
#
|
#
|
||||||
# What can be written like this with the regular calls to column:
|
# What can be written like this with the regular calls to column:
|
||||||
#
|
#
|
||||||
# create_table "products", force: true do |t|
|
# create_table :products do |t|
|
||||||
# t.column "shop_id", :integer
|
# t.column :shop_id, :integer
|
||||||
# t.column "creator_id", :integer
|
# t.column :creator_id, :integer
|
||||||
# t.column "name", :string, default: "Untitled"
|
# t.column :name, :string, default: "Untitled"
|
||||||
# t.column "value", :string, default: "Untitled"
|
# t.column :value, :string, default: "Untitled"
|
||||||
# t.column "created_at", :datetime
|
# t.column :created_at, :datetime
|
||||||
# t.column "updated_at", :datetime
|
# t.column :updated_at, :datetime
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# Can also be written as follows using the short-hand:
|
# can also be written as follows using the short-hand:
|
||||||
#
|
#
|
||||||
# create_table :products do |t|
|
# create_table :products do |t|
|
||||||
# t.integer :shop_id, :creator_id
|
# t.integer :shop_id, :creator_id
|
||||||
|
|
Loading…
Reference in a new issue