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:
parent
759906d512
commit
55b203dac1
3 changed files with 6 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue