Renaming tables
Hi all. I'm new to convex. When Is it possible to change the name of an existing table? When I rename a table in the
schema.ts
file, I'm observing that a new table is created while the old table stays.4 Replies
Hey 👋
Renaming a table isn't actually possible currently - you'll need to create a new table with the name you want, and copy the data from the old table over.
(and then you can delete the old table in the dashboard)
Thanks for the reply, @erquhart Is there a command in the dashboard to copy data over the new table?
No, you’ll need to write convex functions to copy the data over.
The good news is it’s pretty trivial to do so. If you’ve ever worked with databases before, this is analogous to a simple migration.