clarion/db/migrate/20141105100105_create_propositions.rb
Petko Bordjukov cc4f1e9c13 Introduce the Proposition model
Introduce an abstraction that is going to be used to propose models for
other models that can accept propositions.
2015-04-17 02:03:07 +03:00

14 lines
438 B
Ruby

class CreatePropositions < ActiveRecord::Migration
def change
create_table :propositions do |t|
t.references :proposer, index: true
t.references :proposition_accepting, polymorphic: true
t.index [:proposition_accepting_id, :proposition_accepting_type], name: 'proposition_accepting_index'
t.references :proposable, polymorphic: true, index: true
t.integer :status
t.timestamps
end
end
end