Duplicate Databases

The Beta IDE is great! One thing that would be helpful is duplicating the table in the databases.

I know you can download via csv and re-upload, but it would be clean to just click a duplicate button :slight_smile:

Thanks! Anvil is the best team out there!

5 Likes

Agreed, when trying to track down bugs related to production data, it’d be handy to duplicate that data in a test database with a click.

1 Like

That’s the exact use case that led me to post this! :+1:

2 Likes

Plus one for this feature

1 Like

Never tried this but…

  1. Run the clone link of your project, creating a clone copy which will include the old table.
  2. Rename the cloned table for clarity.
  3. In your original project “create a new table” with the + symbol but choose to use the database linked from the “clone” instead of creating a new one. (I don’t use the beta editor, so I’m not sure if this is available in it yet?)
  4. Delete your cloned project and it should leave your linked clone table with the original project as the only “owner”

Definitely not “one click” but it is better than a csv and re-upload.

4 Likes

Ok, so I just tried it in one of my production apps and it seems to have worked fine.

image

I deleted the cloned app it was renamed in also, no issues.

4 Likes