Custom Migration / Add Trigger #8649
Replies: 2 comments
-
That's possible, create a new, empty migration with
You can do this in SELECT EXISTS (
SELECT 1
FROM pg_trigger
WHERE tgname = 'update_location_point_trigger'
); |
Beta Was this translation helpful? Give feedback.
-
Thanks for your tips @r1tsuu! As I'm not using As for toe |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I'm trying to add a custom trigger to the database:
I'm currently doing this in a seed script after all of the tables have been made.
But is it possible to add this to a custom migration? I.e is it possible to create a migration in the migration folder and have Payload latch on to it?
Alternatively I did try adding this to
afterSchemaInit
but the tables weren't created by then, is there a hook for when the tables are created?Beta Was this translation helpful? Give feedback.
All reactions