UUID Use Case

UUID Seed Data

Seed data should look like production — UUID keys, realistic relations — so demos and dev behave the same.

Demo-readyDistinct keysv4

Generated locally with the Web Crypto API — nothing leaves your browser.

What Is UUID Seed Data?

How to generate

  1. Generate UUIDs in the seed script, not hardcoded.
  2. Reference them across related seed rows.
  3. Idempotize by clearing the table first.

Use Cases

Code Examples

JavaScript
const id = crypto.randomUUID();
Python
import uuid
id = uuid.uuid4()

Frequently Asked Questions

Deterministic seed UUIDs?
If you need repeatable seeds, derive them from a fixed namespace (v5) rather than random v4.
Will re-seeding clash?
Clear-then-insert avoids clashes; with v4 you could also just insert and get new ids.

Related tools