HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/gems/default/doc/activerecord-6.1.4.1/ri/ActiveRecord/Migration/up_only-i.ri
U:RDoc::AnyMethod[iI"up_only:ETI"$ActiveRecord::Migration#up_only;TF:publico:RDoc::Markup::Document:@parts[
o:RDoc::Markup::Paragraph;	[I"EUsed to specify an operation that is only run when migrating up ;TI"D(for example, populating a new column with its initial values).;To:RDoc::Markup::BlankLineo;
;	[I"HIn the following example, the new column +published+ will be given ;TI"/the value +true+ for all existing records.;T@o:RDoc::Markup::Verbatim;	[
I">class AddPublishedToPosts < ActiveRecord::Migration[6.0]
;TI"  def change
;TI"A    add_column :posts, :published, :boolean, default: false
;TI"    up_only do
;TI"9      execute "update posts set published = 'true'"
;TI"
    end
;TI"  end
;TI"end;T:@format0:
@fileI"#lib/active_record/migration.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@FI"Migration;TcRDoc::NormalClass00