Displaying 2 results from an estimated 2 matches for "original_id".
Did you mean:
original_uid
2006 Jun 23
1
Describing a "replaces" relationship within the same model
...d and, if so, by what object; and
vice versa what object an object replaces, if any. My idea was the
following:
create_table :events do |t|
t.column :replacement_id, :integer
t.column :description, :text, :null => false
end
create_table :replacements, {:id => false} do |t|
t.column :original_id, :integer, :null => false
t.column :new_id, :integer, :null => false
t.column :date, :date, :null => false
end
Is this a reasonable model and, if so, how should I link Event and
Replacement together?
My idea for the above was: An Event can belong to a Replacement and a
Replacement...
2006 Apr 09
4
Inheritance via Though Associations?
...e_table :reference_items do |t|
t.column :title, :string, :limit => 255
t.column :year, :integer, :limit => 4
t.column :type, :string
t.column :container_id, :integer
t.column :collection_id, :integer
t.column :original_id, :integer
t.column :event_id, :integer
end
create_table :contributors do |t|
t.column :type, :string, :default => "Person"
t.column :sort_name, :string, :limit => 255, :null => false
end
create_table :contrib...