about summary refs log tree commit diff
path: root/db/migrate/20200919234917_add_account_to_custom_emoji.rb
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-09-20 03:37:04 -0500
committerFire Demon <firedemon@creature.cafe>2020-09-20 04:39:27 -0500
commit69473c4fbec7775cae2badfeb16990aa0e9e85a4 (patch)
tree9929bde90cc38cf8ab3398faf29fd2c865f5f26c /db/migrate/20200919234917_add_account_to_custom_emoji.rb
parentd95c3cb550bbbc44c22bce5ef758f0c2d502bbeb (diff)
[Feature] Community-managed custom emoji
Diffstat (limited to 'db/migrate/20200919234917_add_account_to_custom_emoji.rb')
-rw-r--r--db/migrate/20200919234917_add_account_to_custom_emoji.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/migrate/20200919234917_add_account_to_custom_emoji.rb b/db/migrate/20200919234917_add_account_to_custom_emoji.rb
new file mode 100644
index 000000000..b4466ee30
--- /dev/null
+++ b/db/migrate/20200919234917_add_account_to_custom_emoji.rb
@@ -0,0 +1,7 @@
+class AddAccountToCustomEmoji < ActiveRecord::Migration[5.2]
+  def change
+    safety_assured do
+      add_reference :custom_emojis, :account, foreign_key: { on_delete: :nullify }, index: true
+    end
+  end
+end