Skip to content

Commit

Permalink
Clarify that drop_trigger uses different parameters than create_trigg…
Browse files Browse the repository at this point in the history
…er (#112)
  • Loading branch information
shawnpyle authored Jan 2, 2024
1 parent f2fd208 commit f9aaa5a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f9aaa5a

Please sign in to comment.