summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-23 03:53:07 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-23 03:53:07 +0200
commit52cd07b6ff191efd25938b173b7eb14411fec3e4 (patch)
tree9f4f6d73de1ab2fa6944dfd9d2b1d214d1fa99cf /db/migrate
parent41008b3bf126a02fd94820dadb8bb92e0706f157 (diff)
Add action_participants migration
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20260723011350_create_action_participants.rb13
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 @@
1class 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
13end