Sha256: 76983e41e1bcbe5a962c2d24cecf2532fd3f170bf8ab38193889714d545476a5

Contents?: true

Size: 726 Bytes

Versions: 31

Compression:

Stored size: 726 Bytes

Contents

class CreatePurchaseRequests < ActiveRecord::Migration
  def self.up
    create_table :purchase_requests do |t|
      t.integer :user_id, :null => false
      t.text :title, :null => false
      t.text :author
      t.text :publisher
      t.string :isbn
      t.datetime :date_of_publication
      t.integer :price
      t.string :url
      t.text :note
      t.datetime :accepted_at
      t.datetime :denied_at
      t.datetime :created_at
      t.datetime :updated_at
      t.datetime :deleted_at
      t.string :state
      t.string :pub_date

      t.timestamps
    end
    add_index :purchase_requests, :user_id
    add_index :purchase_requests, :state
  end

  def self.down
    drop_table :purchase_requests
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
enju_purchase_request-0.2.1 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.2.0 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.2.0.beta.2 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.1 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre15 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre14 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre13 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre12 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre11 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre10 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre9 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre8 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre7 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre6 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre5 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre4 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre3 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre2 db/migrate/123_create_purchase_requests.rb
enju_purchase_request-0.1.0.pre db/migrate/123_create_purchase_requests.rb