Sha256: 985a273ff4281be4b98316c33e92a8def17b37087bc9a43958b6a7c0bd84ae38

Contents?: true

Size: 340 Bytes

Versions: 3

Compression:

Stored size: 340 Bytes

Contents

class CreateBookWithCustomPrimaryKeys < ActiveRecord::Migration
  def self.up
    create_table :book_with_custom_primary_keys, primary_key: :uid, id: false do |t|
      t.integer :uid
      t.string :title
      t.integer :author_id

      t.timestamps
    end
  end

  def self.down
    drop_table :book_with_custom_primary_keys
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
netzke-workspace-0.10.2 spec/rails_app/db/migrate/20110701070052_create_book_with_custom_primary_keys.rb
netzke-workspace-0.10.1 spec/rails_app/db/migrate/20110701070052_create_book_with_custom_primary_keys.rb
netzke-workspace-0.10.0 spec/rails_app/db/migrate/20110701070052_create_book_with_custom_primary_keys.rb