N
Novuβ€’2y ago
Bocorbojon

Migrate notifications from MySQL database to Novu

Hello, right now in my system I have a notifications drawer that retrieves the notifications from a MySQL database, and I am working on implementing Novu. I was wondering if there is a way to migrate my old notifications onto Novu so the users don't lose them.
7 Replies
Pawan Jain
Pawan Jainβ€’2y ago
@Bocorbojon I am curious to know, do you want to migrate workflows or already triggered notifications from your MySQL db to Novu?
Bocorbojon
BocorbojonOPβ€’2y ago
Already triggered notifications. The table in our database has the columns of "user_id" to indicate who is receiving the notification and "text", for the content. So we have a notification like "User 1234 approved your change", directed to user 3456. We then show the notification in our frontend by fetching the notifications table from our database. I would want to migrate this notification to Novu, so it appears in the Novu notification center of the user 3456.
Pawan Jain
Pawan Jainβ€’2y ago
Thanks @Bocorbojon for sharing the information. It is not possible to migrate these notifications to Novu as our MongoDB collections depend on other collections So it will mess up things
Tomer Barnea
Tomer Barneaβ€’2y ago
@Pawan Jain maybe we can look into a migration script? Create an import script, and define the interface well, and then anyone can convert their data to that.
Pawan Jain
Pawan Jainβ€’2y ago
Yeah sure, I will look into this. Will check if it is possible to migrate
Bocorbojon
BocorbojonOPβ€’2y ago
Hello, I'm back with another question. Is there any way to send the trigger event with a predefined creation date? It would be another solution to have my old SQL notifications in the Novu notification drawer, with the original date they were sent to the user.
Pawan Jain
Pawan Jainβ€’16mo ago
Hi @Bocorbojon Although, it is not directly possible to use custom creation date while triggering an event? But we have option to send custom transactionId in trigger. So one workaround can be to use custom date time (in ISO format)in transactionId like this:- 2023-07-22T16:43:17Z-my-transactionId Let me know if this works for you πŸ™‚ Hi @Bocorbojon Following up on my last message πŸ˜€ Hi @Bocorbojon ping! πŸ™‚
Want results from more Discord servers?
Add your server