ToolJet/server/scripts
Akshay a1587fe49c
Chore: db:seed script for first user setup (#15684)
* Chore: db:seed script for first user setup

Replaces the stale commented-out seed script with a working HTTP-based
implementation that calls POST /api/onboarding/setup-super-admin — the
exact same endpoint QA uses via curl. This ensures the seed creates all
required database records (org, user, roles, environments, groups,
themes, default data sources, instance settings) without duplicating
any business logic.

Supports env var overrides (SEED_EMAIL, SEED_PASSWORD, SEED_NAME,
SEED_WORKSPACE) for CI/preview deployments. Idempotent — skips if
users already exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Chore: use got instead of raw http, improve re-seed message

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Chore: trim verbose logs from seed script

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Chore: remove redundant comment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------
2026-03-25 17:16:18 +05:30
..
services feat: Add LOCKBOX_MASTER_KEY rotation script with interactive key input (#14662) 2025-12-23 22:00:07 +05:30
boot.sh Adding volume for render PR app (#12795) 2025-05-08 01:37:20 +05:30
ce-preview.sh fix: update entrypoint script to use ce-preview.sh for PostgreSQL initialization 2025-11-24 12:58:42 +05:30
create-database.ts Platform LTS Final fixes (#13221) 2025-07-09 22:36:41 +05:30
database-config-utils.ts feat: made tooljet database and marketplace mandatory (#11170) 2024-10-30 17:30:44 +05:30
digitalocean-postbuild.sh Docs: v2 migration (#5198) 2023-01-09 11:51:57 +05:30
drop-database.ts Platform LTS Final fixes (#13221) 2025-07-09 22:36:41 +05:30
env-utils.ts Feat/ldap group sync (#14655) 2026-01-20 23:21:03 +05:30
init-db-boot.sh removed seeding trytoolj (#5294) 2023-01-11 18:44:11 +05:30
plugins-install.ts Cloud licensing related changes (#13033) 2025-07-02 10:57:36 +05:30
plugins-reload.ts Cloud licensing related changes (#13033) 2025-07-02 10:57:36 +05:30
plugins-uninstall.ts Cloud licensing related changes (#13033) 2025-07-02 10:57:36 +05:30
populate-sample-db.ts Initial commit 2025-02-25 12:22:50 +05:30
preview.sh Refactor: Workflows with BullMQ (#14275) 2025-11-05 17:54:38 +05:30
rotate-lockbox-key.ts feat: add rotation support for instance settings in lockbox key rotation script 2026-02-24 13:29:30 +05:30
sample-db-config-reset.ts Initial commit 2025-02-25 12:22:50 +05:30
seeds.ts Chore: db:seed script for first user setup (#15684) 2026-03-25 17:16:18 +05:30
wait-for-it.sh Chore: Add wait for it script (#3909) 2022-09-01 13:00:06 +05:30