feat(migration): phone_number prisma migration
This commit is contained in:
parent
7b86b8c662
commit
cb30d0142e
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "public"."users" ALTER COLUMN "phone_number" SET DATA TYPE TEXT;
|
||||||
|
|
@ -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;
|
||||||
}[] = [];
|
}[] = [];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user