---
title: Database
description: See every table your site has, and add, edit, or delete the rows in them.
sidebar:
  order: 7
---

The Database screen lists every table your site has: a contact form's messages,
a blog's posts, anything else your agent has set up. Your agent creates and
changes the tables themselves. A table is a file of your site, so that change
waits on a branch with the rest of your site's code, and the table changes
when [the branch is merged](/dashboard/branches/#tables). This screen lists the tables
that are live. It is where you see what is in them, work on the rows, and
choose which rows your site shows, how long a table keeps them, and which
times are set for you when a row is added.

Saving how long a table keeps its rows, or which times are set, changes the
table's file and puts that change live at once, on its own. A branch you are
working on is then behind the live site, so
[update it](/dashboard/branches/#update) before you merge.

Each card names the table, the address its rows answer at if they have one, how
many rows it holds, and one sentence for who may write to it and who may read
it:

- **Anyone can add a row through a form on your site, and your pages can show
  them.** A testimonials wall.
- **Anyone can send one through a form on your site. Only you can read them.**
  A contact form.
- **You and your agent add these, and your pages can show them.** A blog.
- **Yours alone. Nothing on your site can read this table.** Notes you keep for
  yourself.

Under that is the table's shape: every column, the type that checks what goes
into it, and what else the definition asks for, such as an answer being
required, a column a page may narrow a listing on, or the values a choice
accepts.

A column may also carry a role, which is what the platform itself reads it for
rather than anything your pages do with it. A **Title** is what a row is called:
its tab title, its shared link, its name on your dashboard, and its entry in a
feed. A **Body** is what the row says, and is what a feed entry carries. A
**Language** says which language the row is written in, which decides the feed
and the sitemap it belongs to. A **Summary** is the sentence or two a row's own
page gives search engines and shared links, and a **Cover** is the picture that
shared link shows; only a picture column can be a cover. Each one is a pill on
the column with a sentence under the table, and most columns have no role at
all.

## Rows

Opening a table shows its rows, newest first, a page at a time.

The **#** column is the row's number inside that table. It starts at 1 for the
first row the table ever held, so "enquiry 14" means the same row here, on a
page, and in an agent's answer. Your other tables count from 1 as well, and
so does everybody else's site.

**Add row** opens a form built from that table's own columns, the same editor
the Posts screen uses. The pencil on a row opens it again, and the bin deletes
it after a confirmation. There is no undo. Nothing else removes a row, unless
you tell the table [how long to keep its
rows](#how-long-a-table-keeps-its-rows).

A Markdown column opens in the same visual editor a post's body does, with its
headings, lists, tables, images from your Disk and **Markdown** switch (see
[Posts](/dashboard/posts/)). A table can have several, and each is an editor of
its own. What is saved is still the Markdown, and Markdown you open and leave
alone is saved exactly as it was written.

A column that points at another of your tables is a list of that table's rows
to pick from, each named by its number and title, and the table's card says
which table it points at. A column that takes several lets you pick more than
one. Deleting a row that other rows point at isn't refused: they keep its
number, shown as **no longer there**, until you pick another.

A picture column holds one file from your [Disk](/dashboard/disk/). **Choose
picture** opens your Disk to pick a file or upload one, and **Remove picture**
clears the column and leaves the file where it is. The table shows the file's
name. Deleting the file from your Disk isn't refused either: the row keeps
pointing at it, the table says it is no longer on your Disk, and your site
leaves the picture out until you choose another.

A time column (the type `datetime`) takes a day and a time of that day in UTC,
which the box says beside its name. When your own clock is some hours off UTC,
a line under the box says the same moment where you are, so a time typed
straight off the wall shows as wrong before you save it. The table lists the
time in UTC as well.

Each box is checked as you leave it, so a value the column will not accept is
said under that box straight away rather than when you save.

Long answers appear under the row rather than in it, so a column wide enough for
a paragraph does not push everything else off the screen.

## Showing a row on your site

A table your pages can read has a **Publish** setting on its card, which
decides which of its rows your site shows:

- **All rows** shows every row as soon as you save it. There is nothing to
  tick and no status to set, and deleting the row is how it comes back off.
- A date column, listed with **(today or earlier)**, holds a row back until
  that day has come. A row with no date is a draft, and a date still to come
  schedules it.
- A checkbox column, listed with **(checked)**, shows only the rows where it
  is ticked.

Choose one and press **Save publication rule**. Your site follows it from the
next visit, in its lists, its row pages, its feed and its sitemap alike, and
nothing you saved in a row is changed. The list offers the table's own date
and checkbox columns, so ask your agent for one if the table has none.

A new table starts on **All rows**. Posts and Portfolio start on their
published date, and switching either to **All rows** puts its drafts and
scheduled rows out at once.

A form on your site can never fill in the column a table publishes by. On a
table visitors add to, a date or a checkbox rule therefore keeps each new row
back until you set it yourself, and **All rows** shows it straight away.

A table nobody but you can read never reaches your site, whatever you save in
it, and has no such setting.

If the table's rows answer at addresses, the editor has an address box too.
Leaving it blank fills one in from the row's title, as long as a column plays
the Title role; without one, a blank address stays blank. Changing the address
of a row that is already on your site moves it, and nothing redirects the old
one, so a link somebody shared stops working.

## How long a table keeps its rows

Every table's card has a **Keep rows for** box, a table only you can read
included. It starts empty, and an empty box keeps every row.

Type a number of days, from 1 to 3650, and press **Save how long rows are
kept**. The dashboard asks you to confirm first. From then on, rows older than
that many days are removed from the table once a day. A row's age counts from the day it was
added, and editing a row doesn't make it younger.

Nothing is removed in the first day after you save or change the number, so
there is time to correct a slip. Empty the box and save, and the table keeps
every row again.

A row removed this way cannot be brought back, from the dashboard or by an
agent. While a site is frozen because its plan no longer covers it (see
[Billing](/dashboard/billing/)), no row is removed; the rows that came due in
the meantime go once the plan covers the site again.

Enquiries, Posts and Portfolio have the box on their cards here too, so a
number on one of those removes old messages, posts or items the same way.

## Times set when a row is added

A table with a time column has **Set when a row is added** on its card, with a
tick for each time column. Tick one and press **Save which times are set**.
From the next row on, that column holds the moment the row was added, whoever
added it: a visitor through a form, you, or your agent. Nobody types that time
in or changes it afterwards, so the row editor shows it without a box, and a
page can rely on it for when a message arrived.

Rows already in the table keep what they hold, so a row added before the tick
is given no time afterwards. Untick the column and save, and it is a time you
type in yourself again: the times already set stay as they are, and a required
one has to be given with every new row.

A form on your site cannot send a time. On a table your site adds rows to, a
row it adds therefore holds no time in a column you untick, and the card says
so. Where such a column is also required, its tick stays on and cannot be
changed, because your site could not add a row without it. To untick it, ask
your agent to make the column optional first.

## Tables with a screen of their own

Enquiries, Posts and Portfolio appear here like any other table, but opening
one takes you to [Enquiries](/dashboard/enquiries/), [Posts](/dashboard/posts/)
or [Portfolio](/dashboard/portfolio/) instead. Those are the same rows with the
right screen around them: an inbox you read and delete from, an editor with a
publish step, and the same editor with covers and an order you set.
