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
You can seed data into convex, please check the first tutorial
Why would oyu move a field from one table to another? :S
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
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
Sounds like you want a migration https://stack.convex.dev/migrating-data-with-mutations
Stateful Migrations using Mutations
Online migrations in Convex using mutations. Including a helper to track migration state!
Perfect! Thanks for sharing