Backendless Support
 
Answered

Is it possible to duplicate the schema of one of my tables into a new table?

Obviously when creating a table by hand I can manually input the schema again and again, but in my case I need several data tables whose which schema's are exactly the same which means a lot of repetative (and error prone) typing. A cut/paste data table schema would be great. Is there anything like this or a quick way to duplicate tables?

BTW I just tried exporting the schema only of my original table then selecteing my new table and hitting import. Despite getting an email saying the import was successful the schema on the new database is not updated. I tried this a few times without success.

Thanks

Leave a Comment

Comments (1)

photo
1

Hi Simon,

There is no direct "clone" schema function. I can think of two ways to get it done:

1. Export schema of an existing table, get the CSV file representing the table/schema, rename the file and re-import it.

or

2. Create a class which has the same structure as the schema. Use Backendless API to save an instance of the class. Rename the class so it would represent another (yet to be created) table. Save an instance of the new class, so Backendless creates the table.

Hope this helps.

Regards,

Mark