diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20260723011350_create_action_participants.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20260723011350_create_action_participants.rb b/db/migrate/20260723011350_create_action_participants.rb new file mode 100644 index 00000000..493ac502 --- /dev/null +++ b/db/migrate/20260723011350_create_action_participants.rb | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | class CreateActionParticipants < ActiveRecord::Migration[8.1] | ||
| 2 | def change | ||
| 3 | create_table :action_participants do |t| | ||
| 4 | t.references :node_action, null: false, foreign_key: true, index: false | ||
| 5 | t.references :subject, polymorphic: true, null: false, index: false | ||
| 6 | end | ||
| 7 | add_index :action_participants, [:subject_type, :subject_id, :node_action_id], | ||
| 8 | :name => "index_action_participants_on_subject_and_action" | ||
| 9 | add_index :action_participants, [:node_action_id, :subject_type, :subject_id], | ||
| 10 | :unique => true, | ||
| 11 | :name => "index_action_participants_uniqueness" | ||
| 12 | end | ||
| 13 | end | ||
