1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

self.up, self.down => up, down

This commit is contained in:
Akira Matsuda 2011-11-07 11:56:50 +09:00
parent 759906d512
commit 55b203dac1
3 changed files with 6 additions and 7 deletions

View file

@ -150,7 +150,7 @@ A short rundown of some of the major features:
* Database agnostic schema management with Migrations.
class AddSystemSettings < ActiveRecord::Migration
def self.up
def up
create_table :system_settings do |t|
t.string :name
t.string :label
@ -162,7 +162,7 @@ A short rundown of some of the major features:
SystemSetting.create :name => "notice", :label => "Use notice?", :value => 1
end
def self.down
def down
drop_table :system_settings
end
end

View file

@ -760,7 +760,7 @@ module ActiveRecord #:nodoc:
# values, eg:
#
# class CreateJobLevels < ActiveRecord::Migration
# def self.up
# def up
# create_table :job_levels do |t|
# t.integer :id
# t.string :name
@ -774,7 +774,7 @@ module ActiveRecord #:nodoc:
# end
# end
#
# def self.down
# def down
# drop_table :job_levels
# end
# end

View file

@ -46,13 +46,13 @@ module ActiveRecord
# +change_table+ is actually of this type:
#
# class SomeMigration < ActiveRecord::Migration
# def self.up
# def up
# create_table :foo do |t|
# puts t.class # => "ActiveRecord::ConnectionAdapters::TableDefinition"
# end
# end
#
# def self.down
# def down
# ...
# end
# end
@ -479,4 +479,3 @@ module ActiveRecord
end
end