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.
Number
Integer or decimal values. Supports sorting, leaderboards, and aggregation. Ideal for scores, prices, quantities, and XP.
Date
A date value stored in ISO 8601 format. Useful for deadlines, event dates, and timestamps.
Boolean
A true/false toggle. Great for status flags like completed, active, verified, or paid.
Select
A predefined list of options that you define when creating the column. Perfect for categories, rarities, status values, and roles.
User
A reference to a Discord user. Stored as a user ID and displayed with the username. Use for ownership, assignments, and relationships.
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
/queryand/leaderboardto view data. - Write — Includes Read permissions plus
/addand/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.