feat(seed): split seed scripts into production and development

- Create seed.production.js with admin user, divisions, and competition types only
- Rename seed.js to seed.development.js with all test data
- Add admin@spotlight.cam account with isAdmin flag and COMFORT tier
- Update test users to use @spotlight.cam domain and SUPPORTER tier
- Remove wsdcId from test users
- Add npm scripts: prisma:seed:dev and prisma:seed:prod
- Add Makefile targets: seed-dev and seed-prod
This commit is contained in:
Radosław Gierwiało
2025-12-06 12:23:05 +01:00
parent 4066bf1081
commit b556abb854
4 changed files with 141 additions and 11 deletions

View File

@@ -12,6 +12,7 @@ endif
.PHONY: help dev-cli prod-cli \
dev-up dev-down dev-up-rebuild \
prod-up prod-down prod-up-rebuild \
seed-dev seed-prod \
test test-watch test-coverage
help:
@@ -24,6 +25,8 @@ help:
@echo " make prod-up # docker compose --profile prod up -d"
@echo " make prod-up-rebuild # docker compose --profile prod up -d --build"
@echo " make prod-down # docker compose --profile prod down"
@echo " make seed-dev # Seed database with development data"
@echo " make seed-prod # Seed database with production data"
@echo " make test # Run backend tests"
@echo " make test-watch # Run backend tests in watch mode"
@echo " make test-coverage # Run backend tests with coverage report"
@@ -57,6 +60,13 @@ prod-up-rebuild:
prod-down:
$(COMPOSE) --profile prod down
# Database seeding
seed-dev:
$(COMPOSE) exec backend npm run prisma:seed:dev
seed-prod:
$(COMPOSE) exec $(BACKEND_SVC) npm run prisma:seed:prod
# Tests
test:
$(COMPOSE) exec $(BACKEND_SVC) npm test