Skip to main content

Import Database Schema

Last updated 8/11/2023

After you have added an external database in Five, you can then import the database schema from your DBMS and all your tables in the database will automatically be created in Five.

You will need the role of Administrator or Control when running Five in the Cloud.



How to Import Your Database Schema

1. Navigate to the Databases view.

2. Select the database record in the list.

info
You cannot import a database schema for the default database created by Five.

3. Click the Import Database Schema button.


Import Database Schema button
Figure 1 - Import Database Schema button

4. Click the OK button.


OK button
Figure 2 - OK button"

info
All your tables in your DBMS will now be built inside of Five which you will find in the Tables view, your data in the tables will also be available to use.

tip
For the primary key field on each imported table, you will need to turn the Generated switch on if you are using GUIDs to uniquely identify each row.

Prerequisite

You will need the role of Developer or Control when running in the Cloud.

1. Select Data in the menu.

2. Select Tables in the sub-menu.


Tables menu item
Figure 3 - Tables menu item

tip
All your table records are now available.

Edit the Primary Key Fields

1. Select a table record in the list.

2. Click the Fields tab.


Fields tab
Figure 4 - Fields tab

3. Select the primary key field in the table.


Primary key field record
Figure 5 - Primary key field record

4. Either click the Edit button in the form app bar, or click directly in a field.


Edit button
Figure 6 - Edit button

5. Click the Generated switch to true.


Generated switch
Figure 7 - Generated switch

6. Click the Save button in the form app bar.


Save button
Figure 8 - Save button

7. Click the Save button in the form app bar above the list.


Save button
Figure 9 - Save button

8. Repeat for all table records that use a GUID as the primary key.