Sha256: 04a68ec8280fa34180235ce70b1b11095b8dc309ccad2bbb7f23afb5cdd446ca

Contents?: true

Size: 964 Bytes

Versions: 8

Compression:

Stored size: 964 Bytes

Contents

migration_class = (ActiveRecord::VERSION::MAJOR >= 5) ?  ActiveRecord::Migration[4.2] : ActiveRecord::Migration
class CreateDummyModels < migration_class
  def self.up
    create_table :companies do |t|
      t.boolean :dummy
      t.string :database
    end

    create_table :users do |t|
      t.string :name
      t.datetime :birthdate
      t.string :sex
     end

     create_table :delayed_jobs do |t|
       t.integer  :priority,   :default => 0
       t.integer  :attempts,   :default => 0
       t.text     :handler
       t.text     :last_error
       t.datetime :run_at
       t.datetime :locked_at
       t.datetime :failed_at
       t.string   :locked_by
       t.datetime :created_at
       t.datetime :updated_at
       t.string   :queue
     end

     add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"

  end

  def self.down
    drop_table :companies
    drop_table :users
    drop_table :delayed_jobs
  end

end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ros-apartment-2.4.0 spec/dummy/db/migrate/20110613152810_create_dummy_models.rb
ros-apartment-2.3.0 spec/dummy/db/migrate/20110613152810_create_dummy_models.rb
ros-apartment-2.3.0.alpha2 spec/dummy/db/migrate/20110613152810_create_dummy_models.rb
ros-apartment-2.3.0.alpha1 spec/dummy/db/migrate/20110613152810_create_dummy_models.rb
apartment-2.2.1 spec/dummy/db/migrate/20110613152810_create_dummy_models.rb
apartment-2.2.0 spec/dummy/db/migrate/20110613152810_create_dummy_models.rb
apartment-2.1.0 spec/dummy/db/migrate/20110613152810_create_dummy_models.rb
apartment-2.0.0 spec/dummy/db/migrate/20110613152810_create_dummy_models.rb