feat(migration): phone_number prisma migration

This commit is contained in:
Matthieu Haineault 2025-08-26 12:58:02 -04:00
parent 7b86b8c662
commit cb30d0142e
2 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "public"."users" ALTER COLUMN "phone_number" SET DATA TYPE TEXT;

View File

@ -1,7 +1,7 @@
import { PrismaClient, Roles } from '@prisma/client'; import { PrismaClient, Roles } from '@prisma/client';
const prisma = new PrismaClient(); const prisma = new PrismaClient();
const BASE_PHONE = 1_100_000_000; // < 2_147_483_647 const BASE_PHONE = '1_100_000_000'; // < 2_147_483_647
function emailFor(i: number) { function emailFor(i: number) {
return `user${i + 1}@example.test`; return `user${i + 1}@example.test`;
@ -16,7 +16,7 @@ async function main() {
first_name: string; first_name: string;
last_name: string; last_name: string;
email: string; email: string;
phone_number: number; phone_number: string;
residence?: string | null; residence?: string | null;
role: Roles; role: Roles;
}[] = []; }[] = [];