Copy a schema
Probably the easiest way to create a new entity type is to copy an existing type: for example, if you copy the user entity type, in a matter of seconds you’ll have exact copy of the user entity type, the same in every respect.
Well, OK, with one very important exception: the underlying JSON structure will be exactly the same, but your new entity type won’t have any of the data found in the user entity type. Remember, you’re only copying the database schema; you aren’t copying the database data.
What if you really need to copy the data from user to the new entity type? Well, your best bet would be to export the data from user and then import it into the new entity type. But that’s a task that goes beyond what you can do using Console.
To create a new entity type that uses an existing schema, complete the following procedure:
-
Click Create and then click Entity Type:
-
In the subsequent dialog box, click Copy Existing Entity Type:
-
In the next dialog box, click Select an entity type, click the entity type whose schema you want to copy, and then click Save:
Note that, by default, Console creates an entity type name for you by appending _copy to the name of the schema being copied:
You can keep that name or replace it with a name of your own choosing. That’s entirely up to you.
And what if your schema name already ends in _copy? No problem; Console will simply append a second instance of _copy:
After you click Save, the entity type schema is copied and you’ll see the following message:
This message simply means that the schema has been created; in fact, you can immediately start modifying that schema. However, it might take a few minutes before you can start adding new records to that entity type. Yes, the entity type will appear in the Manage Profiles section, but if you try to access your new database you might encounter a message like this:
>
What should you do if you do encounter this message? The best thing to do is just relax and not worry about it. Wait a few minutes, and then try again. Sometime within the next 15 minutes or so the entity type will be ready and you can begin adding data to it.
Updated almost 3 years ago