michi
michi5mo ago

Common patterns for migration and data seeding

Hello, i am new to convex and wanted to learn how i can go from development to deploying to production with convex. What are the some common ways you guys perform migrations and data seeding. for example, seeding the admin account details when setting up the application for the first time. or, changing moving out a field from one table to another table after the app has hit production?
5 Replies
jamalsoueidan
jamalsoueidan5mo ago
You can seed data into convex, please check the first tutorial Why would oyu move a field from one table to another? :S
michi
michiOP5mo ago
say there's an table where each item has a tag, a single string. but later the requirement changed and now we need to have multiple tags. in which case i would like to create another table for tags with a one-to-many relationship back to the original table ping x3
jamalsoueidan
jamalsoueidan5mo ago
then i can imagine you export the data, and seed to the other table...i dont know if you can delete a column with convex, havnt seen anything related to that
lee
lee5mo ago
Stateful Migrations using Mutations
Online migrations in Convex using mutations. Including a helper to track migration state!
michi
michiOP5mo ago
Perfect! Thanks for sharing

Did you find this page helpful?