Commit graph

7 commits

Author SHA1 Message Date
Akshay Sasidharan
b1f343b07d refactor: rewrite seed script to use TypeORM directly
The old seed script was fully commented out and its backing service
(seed.service.ts_ig) had broken imports and missing onboarding status,
causing the frontend to redirect to /setup on every page load.

The new script connects directly via TypeORM DataSource and creates:
org, SSO config, super admin user, org-user mapping, default
environments, permission groups, and marks both user.onboardingStatus
and metadata.onboarded so the frontend skips /setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 16:16:42 +05:30
Akshay Sasidharan
417581d1c4 refactor: rewrite seed script to use TypeORM directly
The old seed script was fully commented out and its backing service
(seed.service.ts_ig) had broken imports and missing onboarding status,
causing the frontend to redirect to /setup on every page load.

The new script connects directly via TypeORM DataSource and creates:
org, SSO config, super admin user, org-user mapping, default
environments, permission groups, and marks both user.onboardingStatus
and metadata.onboarded so the frontend skips /setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:58:26 +05:30
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
gsmithun4
269ec56455 Initial commit 2025-02-25 12:22:50 +05:30
Muhsin Shah
0eb0cf3c25 Added migration helpers 2024-06-27 16:38:46 +05:30
Akshay
5b30aa2007
Chore: Setup pipeline (#1539)
* github actions for PR and push to develop branch

* test workflow

* move to workflows folder

* add setup node action

* modify build

* specify npm version

* config unit test

* specify host postgres

* specify container to run on

* add postgresql dependency

* add specify ws adapter for test

* add e2e test

* fix linting

* only log errors on tests

* update eslint config

* fix linting

* run e2e test in silent mode

* fix library app spec

* dont send email on test env

* fix org scope

* mock env vars

* remove reset modules

* force colors

* explicitly close db connection

* add eslint rule for floating promises

* update workflow

* fix floating promise

* fix lint

* update workflow

* run on all push and pulls

* update lint check files

* simplify workflow

* increase js heap size on env

* separate lint and build

Co-authored-by: arpitnath <arpitnath42@gmail.com>
2021-12-10 08:43:05 +05:30
Akshay Sasidharan
2779ea24e8 setup database seed 2021-08-03 09:41:39 +05:30