Sha256: 9c050d89705063289818821fe38fc73a81ae4618aed1bc416fcd00f603b690ae

Contents?: true

Size: 405 Bytes

Versions: 7

Compression:

Stored size: 405 Bytes

Contents

migration_class =
  if ActiveRecord::VERSION::MAJOR >= 5
    ActiveRecord::Migration[4.2]
  else
    ActiveRecord::Migration
  end

class CreatePostrws < migration_class
  def change
    create_table :postrws do |t|
      t.string :title
      t.text :body

      t.timestamps
    end
    create_table :postrws_archive do |t|
      t.string :title
      t.text :body

      t.timestamps
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
archiving-0.6.1 test/dummy/db/migrate/20190711112558_create_postrws.rb
archiving-0.6.0 test/dummy/db/migrate/20190711112558_create_postrws.rb
archiving-0.5.0 test/dummy/db/migrate/20190711112558_create_postrws.rb
archiving-0.4.4 test/dummy/db/migrate/20190711112558_create_postrws.rb
archiving-0.4.3 test/dummy/db/migrate/20190711112558_create_postrws.rb
archiving-0.4.1 test/dummy/db/migrate/20190711112558_create_postrws.rb
archiving-0.4.0 test/dummy/db/migrate/20190711112558_create_postrws.rb