How do I import data into a table? Do I need to create the primary keys manually before importing?
Hi Backend_Doctor, thanks for joining, and great question! The answer to your question is yes, you can import data.
Let me break this down into two parts:
1. How do I import data into a table?
Five lets you import CSV files into your database tables, and automatically maps the fields from your CSV onto the database provided that the column names inside your CSV and the field names inside your table are the same.
2. Do I need to create primary keys?
The answer is it depends. Five can automatically create the primary keys for you. You can also select not to import primary keys, or make another column in your CSV the primary key.
Here’s a video to demonstrate the process:
Thank you @Dom_Five.Co and how do you add a new field to the database & what are the options?
you can add new fields to an existing database table inside Five. Here’s a video demonstrating the process:
I’m also outlining the steps below:
- Simply navigate to Tables,
- Select the table you would like to add a field to,
- Click on Fields,
- Click on Add Field,
- Fill in the required information (field ID, data type, size and display type),
- Click on Save,
- Click on Save again,
- Five will now prompt you to select from one of four options for all previous records inside your table: you can assign a fixed value, refer to another field, write a query or simply leave your new field empty for all existing records.
- Click Save again.