Create Table Fields

Define the columns and data types for your Datasquirel tables.

Overview

Fields (also called columns) define the structure of a SQL table. Every row in the table must conform to the field definitions. Datasquirel provides a visual field editor that maps directly to MariaDB column definitions — what you define is what gets created in the database.

Adding a Field

Open a table in your admin panel and click Add Field (or access the field editor during table creation). For each field you need to provide:

Field Name

The name of the column. Use lowercase letters, numbers, and underscores. This name is used in API responses and SQL queries (e.g. first_name, created_at).

Data Type

The SQL data type for the column. Common types include:

TypeDescription
VARCHARVariable-length text, up to a defined maximum length (e.g. VARCHAR(255))
INT32-bit integer
BIGINT64-bit integer — use for IDs that may exceed 2 billion
TEXTUnlimited-length text
LONGTEXTVery large text content (e.g. HTML, Markdown, JSON)
DATETIMEDate and time value
DATEDate only
BOOLEANTrue/false stored as TINYINT(1)
FLOATFloating-point number
JSONStructured JSON data
ENUMA value from a predefined list

See the full list in the Database Reference → Data Types.

Required

Check this option to add a NOT NULL constraint — the field must have a value on every insert. Leave it unchecked to allow NULL.

Default Value

A value to use when no value is provided on insert. For example:

  • 0 for numeric fields
  • "" for empty text
  • CURRENT_TIMESTAMP for datetime fields that should auto-populate

More Options

Click More on any field to access additional options:

  • Unique — adds a UNIQUE constraint so no two rows can have the same value for this field.
  • Encryption — encrypts the value before storing it. Useful for sensitive data like tokens.
  • Foreign Key — links this field to a column in another table, enforcing referential integrity.

Editing and Removing Fields

To edit an existing field, open the table schema editor and click on the field. To remove a field, click the delete icon next to it. Removing a field drops the column from the underlying MariaDB table — all data in that column will be lost.

What's Next