devstcD
Convex Community6mo ago
6 replies
devstc

Create a new table programmatically?

If I'm trying to use a backend mutation using insert to create a new table, the insert function only appears to be able to accept table names that already exist, so it doesn't appear I can create a new table that way. Also, I know when I define a table in the schema.ts file and save the file, a new table is created in the database, so perhaps somehow working with the schema.ts file is the way to add new tables programmatically. Is this a method worth pursuing or is there another way that's better? Or is creating a new table programmatically just not possible? In other words, do all new tables have to be created manually? Thanks for any help someone may be able to provide.
Was this page helpful?