Infraista DocsDocs
Data & storageDatabases

Data Explorer and SQL console

Browse and edit tables in the browser, run SQL safely in read-only or write mode, import and export data, track schema changes and run one script on many databases.

You can work with your data from the console, without installing a database client.

Data Explorer

Open the database and select Data Explorer. The tree on the left lists the databases on the server, then each database's Tables, Views, Functions & procedures and Triggers.

Browse and edit rows

  • Open a table to see its rows. Double-click a cell to edit it; add a row with the insert button; delete a row from its menu.
  • Edits made here in the last 7 days are listed in the table's history, newest first, with Undo. (Changes made with SQL or by your apps aren't listed.)

Change the structure

A table's structure view lists its Columns, Indexes and Foreign keys, with Add column, Add index and Add foreign key, and its CREATE statement.

Table and database actions

From a table's menu: Query in SQL console, Import CSV… (rows are added; if any row fails, nothing is imported), Rename…, Empty… (deletes every row, keeps the table) and Delete….

From a database's menu: New table, Import SQL file…, Export (SQL dump) and Open in SQL console. New database adds an empty database to the server.

Emptying or deleting a table can't be undone. Take a backup first if you might need the data.

SQL console

Select SQL console to run SQL against a database.

  • It starts in Read-only mode: statements that change data or structure are blocked. Switch to Write mode when you need to change something; write-mode runs are recorded in the audit log.
  • Select Run (or press the shortcut shown) to run the query, or only the selected text.
  • Preview runs the script inside a transaction, shows what it would change (rows before and after), then rolls everything back. Nothing is saved.
  • Queries stop after 30 seconds and show up to 1,000 rows per result. Export as CSV downloads a result.
  • Explain plan shows how the database will run a query.
  • History and saved queries keeps the queries you ran; Save query keeps one for later (saved queries are only visible to you).
  • Database tools downloads a dump (.sql.gz) or imports a SQL file.

Fleet query

For apps with a database per tenant, Fleet query runs one script on many databases of the server in the background, a few at a time, and merges the results into one table.

Scripts that change data always run on the first database first and wait for you to check the result before the rest. Changes made by a script can't be undone from here.

Schema history and compare

Schema history keeps snapshots of a database's structure and shows what changed in each. Compare picks another database on the server, or an earlier snapshot, and writes the SQL that makes this database match it. Nothing changes until you run it.

On this page