Repository navigation
Closed
Labels
Description
Problem
There is no way to fill a table with test rows. The value tools all work on rows that already exist:
- Set Value and Generate UUID set the selected cells, one UUID per cell (
features/change-tracking.mdx:45-47). - Fill Column writes one value, NULL, or a UUID per row into every loaded row (
features/change-tracking.mdx:57). - The sample database on the welcome window is a fixed dataset, not a generator.
Testing a query plan on 100,000 rows, a pagination edge, or a screen with realistic names and dates means writing INSERT statements or a script by hand, or building a CSV elsewhere and importing it.
Proposed solution
- Generate Rows… in a table's context menu, taking a row count from 1 to 1,000,000.
- One generator per column, chosen from the column's type and name and changeable: a number range, text of a given length, names, emails, phone numbers, addresses, dates in a range, UUID v4 or v7, booleans at a ratio, a list of values, or a pattern, plus a NULL ratio on nullable columns.
- Constraints respected: unique and primary key columns never repeat, enum and set columns take their own values, and foreign key columns take values that exist in the referenced table. Identity, auto-increment and generated columns are left to the server.
- A seed, so the same settings give the same rows.
- A preview of the first rows, then batched inserts in one transaction with progress and Cancel, through Safe Mode like any other write. Or Copy as SQL to put the
INSERTstatements in a query tab instead. - The settings are remembered per table.
Done when: 100,000 rows go into a PostgreSQL table with a foreign key, a unique column and an enum with no constraint failure, the same seed produces the same rows, and the same works on MySQL and SQLite.
Alternatives considered
Write a script with a fake-data library and import its CSV, or write INSERT ... SELECT with generate_series on PostgreSQL.
Platform
macOS
Related database type
N/A / General
Activity