Create a Database Table
This guide walks you through creating and configuring database tables using the Restura visual editor.
Step 1: Navigate to the Database Page
Section titled “Step 1: Navigate to the Database Page”Click Database in the sidebar to open the schema editor.
Step 2: Add a New Table
Section titled “Step 2: Add a New Table”Click the “Add Table” button in the top-right corner.
Your new table is created with a random name and three default columns (id, createdOn, modifiedOn).
Step 3: Rename the Table
Section titled “Step 3: Rename the Table”- Click the pencil icon next to the table name
- Type your table name (e.g.,
user_profile) - Press Enter to save
Step 4: Add Columns
Section titled “Step 4: Add Columns”- Click the ”+” button below the Columns section
- Click the column name to edit it
- Select a type from the Type dropdown
- Configure other properties as needed (nullable, default value, etc.)
Step 5: Add Indexes
Section titled “Step 5: Add Indexes”- Scroll to the Indexes section
- Click the ”+” button
- Select the column(s) to index
- Toggle Unique if needed
- Add a Where clause if needed
Step 6: Add Foreign Keys
Section titled “Step 6: Add Foreign Keys”- Scroll to the Foreign Keys section
- Click the ”+” button
- Select your column, the referenced table, and referenced column
- Choose On Delete and On Update actions
Step 7: Apply Changes
Section titled “Step 7: Apply Changes”- Click “Preview Schema” in the top bar
- Review the SQL migration
- Click “Submit”
What Else Can You Do?
Section titled “What Else Can You Do?”- Check Constraints - Add custom validation rules
- Notifications - Set up PostgreSQL NOTIFY triggers
- Filter & Search - Use the filter buttons to show/hide sections, or search by table name or column type
- Delete - Click the trash icon to remove columns, indexes, foreign keys, or entire tables
For detailed information on column types, smart detection, and all available options, see the Database Reference.