From 3bd3b57b1fcb524978377ee9dd75daac4fcad3e4 Mon Sep 17 00:00:00 2001 From: Shawn Pyle Date: Tue, 21 Mar 2023 12:35:42 -0400 Subject: [PATCH] Clarify that drop_trigger uses different parameters than create_trigger --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 6c4fe8f..c8a9fa2 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,15 @@ you need to actually implement `up`/`down` methods in your migration (rather than `change`) so that it does the right thing when rolling back. +The `drop_trigger` currently only supports the `drop_trigger(name, table, options = {})` +format. You will need to determine what the resulting trigger name is (e.g. `SHOW TRIGGERS` +query) and use that name in the `drop_triggers` call. Your `down` migration method +might contain something like: + +```ruby +drop_trigger(:users_after_insert_row_tr, :transactions) +``` + #### Manual triggers and :compatibility As bugs are fixed and features are implemented in HairTrigger, it's possible