Initial commit: MOPC platform with Docker deployment setup
Full Next.js 15 platform with tRPC, Prisma, PostgreSQL, NextAuth. Includes production Dockerfile (multi-stage, port 7600), docker-compose with registry-based image pull, Gitea Actions CI workflow, nginx config for portal.monaco-opc.com, deployment scripts, and DEPLOYMENT.md guide. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
prisma/seed-jury-assignments.sql
Normal file
21
prisma/seed-jury-assignments.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
DO $$
|
||||
DECLARE
|
||||
jury_id TEXT;
|
||||
round_id TEXT;
|
||||
proj RECORD;
|
||||
BEGIN
|
||||
SELECT id INTO jury_id FROM "User" WHERE email = 'jury.demo@monaco-opc.com';
|
||||
SELECT id INTO round_id FROM "Round" WHERE slug = 'mopc-2026-round-1';
|
||||
|
||||
UPDATE "Round" SET status = 'ACTIVE', "votingStartAt" = NOW() - INTERVAL '7 days', "votingEndAt" = NOW() + INTERVAL '30 days' WHERE id = round_id;
|
||||
|
||||
FOR proj IN SELECT id, title FROM "Project" WHERE "roundId" = round_id ORDER BY "createdAt" DESC LIMIT 8
|
||||
LOOP
|
||||
INSERT INTO "Assignment" (id, "userId", "projectId", "roundId", method, "isRequired", "isCompleted", "createdAt")
|
||||
VALUES ('demo-assign-' || substr(proj.id, 1, 15), jury_id, proj.id, round_id, 'MANUAL', true, false, NOW())
|
||||
ON CONFLICT ("userId", "projectId", "roundId") DO NOTHING;
|
||||
RAISE NOTICE 'Assigned: %', proj.title;
|
||||
END LOOP;
|
||||
|
||||
RAISE NOTICE 'Done! Assigned projects to jury member.';
|
||||
END $$;
|
||||
Reference in New Issue
Block a user