Skip to content

Instantly share code, notes, and snippets.

@lucascaton
Created September 22, 2009 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucascaton/190916 to your computer and use it in GitHub Desktop.
Save lucascaton/190916 to your computer and use it in GitHub Desktop.
class CreateStuffs < ActiveRecord::Migration
def self.up
create_table :stuffs, :primary_key => :cod do |t|
t.integer :cod
t.integer :stuff_type_id
t.timestamps
end
end
def self.down
drop_table :stuffs
end
end
class CreateStuffs < ActiveRecord::Migration
def self.up
create_table :stuffs, :primary_key => :cod do |t|
#t.integer :cod
t.integer :stuff_type_id
t.timestamps
end
end
def self.down
drop_table :stuffs
end
end
class CreateStuffs < ActiveRecord::Migration
def self.up
create_table :stuffs do |t|
t.integer :cod, :primary_key
t.integer :stuff_type_id
t.timestamps
end
end
def self.down
drop_table :stuffs
end
end
class CreateStuffs < ActiveRecord::Migration
def self.up
create_table :stuffs, :primary_key => :cod, :id => false do |t|
t.integer :cod
t.integer :stuff_type_id
t.timestamps
end
end
def self.down
drop_table :stuffs
end
end
class CreateStuffs < ActiveRecord::Migration
def self.up
create_table :stuffs, :primary_key => :cod, :id => false do |t|
#t.integer :cod
t.integer :stuff_type_id
t.timestamps
end
end
def self.down
drop_table :stuffs
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment