adonis-notifications
adonis-notifications copied to clipboard
When using database, Primary key id is set to Auto Increment.
You are passing id to Notification.create(), which is causing this. I can fix it if you want
sqlMessage: "Duplicate entry '4294967295' for key 'notifications.PRIMARY'",
sqlState: '23000',
index: 0,
sql: 'insert into notifications
(created_at
, data
, id
, notifiable_id
, notifiable_type
, type
, updated_at
) values ('2020-10-20 12:38:35', '{\"notifiedBy_id\":1,\"notifiedBy_name\":\"Prince Vishal\",\"message\":\"You owe 50 to Prince Vishal. This is a gentle reminder to pay back.\",\"split_id\":187,\"expense_id\":65}', 'df829d02-b1ee-4113-9cb2-64bb77e1a4da', 50, 'users', 'notify-to-pay', '2020-10-20 12:38:35')'
I think it's because the default behavior of the database channel is UUID, which mean need to be inserted manually