Tables & Schemas

Tables are the core of CordBase. Each table defines a schema that auto-generates slash commands for your server members.

Column Types

Every column has a type that determines how data is validated, stored, and displayed in Discord.

Text

Free-form text up to 1,024 characters. Use for names, descriptions, notes, or any string data.

In Discord:A standard text input in the slash command.
Examples:Diamond Sword, Quest description, Player notes

Number

Integer or decimal values. Supports sorting, leaderboards, and aggregation. Ideal for scores, prices, quantities, and XP.

In Discord:A number input with validation. Non-numeric values are rejected.
Examples:100, 3.5, -20

Date

A date value stored in ISO 8601 format. Useful for deadlines, event dates, and timestamps.

In Discord:Accepts formats like 2026-03-27 or March 27, 2026.
Examples:2026-03-27, January 1, 2026

Boolean

A true/false toggle. Great for status flags like completed, active, verified, or paid.

In Discord:A choice between True and False.
Examples:true, false

Select

A predefined list of options that you define when creating the column. Perfect for categories, rarities, status values, and roles.

In Discord:Discord autocomplete dropdown with your defined options.
Examples:Common / Rare / Epic / Legendary

User

A reference to a Discord user. Stored as a user ID and displayed with the username. Use for ownership, assignments, and relationships.

In Discord:Discord's native user picker with autocomplete.
Examples:@Neo, @Player1

Column Settings

  • Required — When enabled, the slash command will require this field. When disabled, the field is optional and can be left blank.
  • Default Value — An optional default that is used when the user does not provide a value. Only applies to non-required columns.
  • Unique — Prevents duplicate values in the column. Useful for things like usernames or item names where duplicates would cause confusion.

Editing a Table Schema

You can edit a table after creation from the dashboard. Go to your table and click Edit Table.

  • Add columns — New columns are added to the end of the schema. Existing rows get a null value for the new column until updated.
  • Rename columns — Changes the display name and slash command option name. Existing data is preserved.
  • Remove columns — Deletes the column and its data from all rows. This cannot be undone.
  • Change column type — Type changes are allowed as long as existing data can be converted. For example, number to text works, but text to number will fail if any row contains non-numeric text.

After saving changes, CordBase re-registers the slash commands with Discord. This takes a few seconds to propagate.

Role-Based Permissions

Each table has three permission levels that can be assigned to Discord roles:

  • Read — Can use /query and /leaderboard to view data.
  • Write — Includes Read permissions plus /add and /update (own rows only by default).
  • Admin — Full access including /delete, /bulk-update, and /bulk-delete. Can edit or delete any row, not just their own.

By default, @everyone has Read + Write access and server administrators have Admin access. You can change this per table in the dashboard.