SchemaSeed Guides

Schema seed for a SQL database

Paste a CREATE TABLE in the browser and download JSON, CSV, or SQL inserts. Foreign keys come from the parent rows. The schema never leaves the machine.

A schema seed is a set of rows that match tables you already defined. SchemaSeed reads a CREATE TABLE statement, or a CSV header, and fills those columns with realistic test data.

How to seed a schema

  1. Paste the tables. Include primary keys, NOT NULL, CHECK lists, and foreign keys.
  2. Check the generator next to each column. email becomes an email. created_at becomes a timestamp. A CHECK list is used as the only allowed values.
  3. Choose the database. PostgreSQL, MySQL, SQLite, and SQL Server are included. The SQL file inserts parent tables before child tables, so a foreign key points at a row that exists.
  4. Download the seed. Every table is included, up to 10,000 rows.
CREATE TABLE users (
  id INTEGER PRIMARY KEY,
  email VARCHAR(255) NOT NULL,
  city VARCHAR(80)
);

That statement is enough to seed the schema. The rows stay in the browser until you download them. Close the tab and they are gone.

People also write this as “seed schema.” Both mean the same job here: start from the schema, produce rows that fit it, and load them with SQL or a CSV import.

Questions

How do I seed a SQL schema with test data? Paste a CREATE TABLE statement. SchemaSeed fills the columns and downloads JSON, CSV, or SQL INSERT statements. Parent tables are written before child tables.

Do the foreign keys point at real parent rows? Yes. Child foreign keys are chosen from the parent rows that were just generated, and the SQL file inserts parents first.

Does the schema get uploaded? No. Parsing and generation run in the browser. The schema and the rows stay on your machine until you download a file.

How many rows? Every table is included, up to 10,000 rows. There is no account.

Seed a schema