diff --git a/src/app/api/healthdata/route.tsx b/src/app/api/healthdata/route.tsx index 7d3540ad..1ca848d7 100644 --- a/src/app/api/healthdata/route.tsx +++ b/src/app/api/healthdata/route.tsx @@ -53,7 +53,7 @@ export async function POST(request: Request) { // Now, proceed with updating or creating userDetail const { sex, weight, height, bodyFat, muscularMass, birthDate } = body - console.log('aca ando') + const detail = await db .select() .from(userDetail) @@ -76,28 +76,36 @@ export async function POST(request: Request) { .where(eq(userDetail.idUser, session.user?.id)) } else { // Create userDetail - res = await db.insert(userDetail).values({ + + const insertData: { + sex: string + idUser: number + weight: number + height: number + bodyFat?: number + muscularMass?: number + birthDate: Date + } = { idUser: session.user?.id, sex: sex, weight: Number(weight), height: Number(height), - bodyFat: Number(bodyFat), - muscularMass: Number(muscularMass), birthDate: new Date(birthDate), - }) - console.log(res) - - // If phoneNumber is provided, update it in the User table - if (phoneNumber) { - await db - .update(user) - .set({ - phoneNumber: phoneNumber, - }) - .where(eq(user.idUser, session.user?.id)) } - const medical = await db.insert(medicalProfile).values({ + if (bodyFat) { + insertData.bodyFat = Number(bodyFat) + } + + if (muscularMass) { + insertData.muscularMass = Number(muscularMass) + } + + console.log(insertData) + + res = await db.insert(userDetail).values(insertData) + + await db.insert(medicalProfile).values({ idUser: session.user?.id, emergencyName: null, emergencyPhone: null, @@ -105,7 +113,6 @@ export async function POST(request: Request) { insuranceCompany: null, bloodType: null, }) - console.log(medical) } return NextResponse.json(res, { status: 200 }) } catch (error) { diff --git a/src/app/api/membership/route.tsx b/src/app/api/membership/route.tsx index 1aa9b3f4..2e5ab668 100644 --- a/src/app/api/membership/route.tsx +++ b/src/app/api/membership/route.tsx @@ -6,13 +6,13 @@ import { user } from '@/src/db/schema/schema' import { db } from '@/src/db/drizzle' export async function GET() { - try { - const session = await getServerSession(authOptions) + const session = await getServerSession(authOptions) - if (!session) { - return NextResponse.json({ message: 'Unauthorized' }, { status: 401 }) - } + if (!session) { + return NextResponse.json({ message: 'Unauthorized' }, { status: 401 }) + } + try { const res = await db .select() .from(user) diff --git a/src/app/api/post/route.tsx b/src/app/api/post/route.tsx index bffe6d9d..5f6d0ea1 100644 --- a/src/app/api/post/route.tsx +++ b/src/app/api/post/route.tsx @@ -7,13 +7,13 @@ import { db } from '@/src/db/drizzle' import { sql } from 'drizzle-orm/sql' export async function GET() { - try { - const session = await getServerSession(authOptions) + const session = await getServerSession(authOptions) - if (!session) { - return NextResponse.json({ message: 'Unauthorized' }, { status: 401 }) - } + if (!session) { + return NextResponse.json({ message: 'Unauthorized' }, { status: 401 }) + } + try { const res = await db .select({ idPost: posts.idPost, diff --git a/src/app/api/post/user/route.tsx b/src/app/api/post/user/route.tsx index e87be0c0..6808ac1e 100644 --- a/src/app/api/post/user/route.tsx +++ b/src/app/api/post/user/route.tsx @@ -6,13 +6,13 @@ import { db } from '@/src/db/drizzle' import { user } from '@/src/db/schema/schema' export async function GET() { - try { - const session = await getServerSession(authOptions) + const session = await getServerSession(authOptions) - if (!session) { - return NextResponse.json('Unauthorized', { status: 401 }) - } + if (!session) { + return NextResponse.json('Unauthorized', { status: 401 }) + } + try { const res = await db .select() .from(user) diff --git a/src/app/api/profile/userData/route.tsx b/src/app/api/profile/userData/route.tsx index 36ccfa01..9ec14d99 100644 --- a/src/app/api/profile/userData/route.tsx +++ b/src/app/api/profile/userData/route.tsx @@ -6,13 +6,13 @@ import { medicalProfile } from '@/src/db/schema/schema' import { db } from '@/src/db/drizzle' export async function GET() { - try { - const session = await getServerSession(authOptions) + const session = await getServerSession(authOptions) - if (!session) { - return NextResponse.json('Unauthorized', { status: 401 }) - } + if (!session) { + return NextResponse.json('Unauthorized', { status: 401 }) + } + try { const detail = await db .select() .from(medicalProfile) diff --git a/src/app/api/ranking/route.ts b/src/app/api/ranking/route.ts index a3ec84d9..de1b62ee 100644 --- a/src/app/api/ranking/route.ts +++ b/src/app/api/ranking/route.ts @@ -6,13 +6,13 @@ import { userPoints, user } from '@/src/db/schema/schema' import { eq, desc } from 'drizzle-orm' export async function GET() { - try { - const session = await getServerSession(authOptions) + const session = await getServerSession(authOptions) - if (!session) { - return NextResponse.json({ message: 'Unauthorized' }, { status: 401 }) - } + if (!session) { + return NextResponse.json({ message: 'Unauthorized' }, { status: 401 }) + } + try { const res = await db .select({ idUser: user.idUser, diff --git a/src/app/api/records/sleep/last/route.tsx b/src/app/api/records/sleep/last/route.tsx index 4661cf11..7ac7d4e6 100644 --- a/src/app/api/records/sleep/last/route.tsx +++ b/src/app/api/records/sleep/last/route.tsx @@ -7,13 +7,13 @@ import { getServerSession } from 'next-auth' import { NextResponse } from 'next/server' export async function GET() { - try { - const session = await getServerSession(authOptions) + const session = await getServerSession(authOptions) - if (!session) { - return NextResponse.json('Unauthorized', { status: 401 }) - } + if (!session) { + return NextResponse.json('Unauthorized', { status: 401 }) + } + try { const res = await db .select() .from(record) diff --git a/src/app/api/records/sleep/route.tsx b/src/app/api/records/sleep/route.tsx index 4781148e..b257540c 100644 --- a/src/app/api/records/sleep/route.tsx +++ b/src/app/api/records/sleep/route.tsx @@ -6,13 +6,13 @@ import { getServerSession } from 'next-auth' import { NextResponse } from 'next/server' export async function GET() { - try { - const session = await getServerSession(authOptions) + const session = await getServerSession(authOptions) - if (!session) { - return NextResponse.json('Unauthorized', { status: 401 }) - } + if (!session) { + return NextResponse.json('Unauthorized', { status: 401 }) + } + try { //get data from the last 7 days const res = await db .select({ diff --git a/src/app/api/stripe/payment/route.ts b/src/app/api/stripe/payment/route.ts index af1f4fd1..8ad26411 100644 --- a/src/app/api/stripe/payment/route.ts +++ b/src/app/api/stripe/payment/route.ts @@ -1,4 +1,5 @@ import { authOptions } from '@/src/lib/auth/authOptions' +import config from '@/src/lib/environment/config' import { stripe } from '@/src/lib/stripe/stripe' import { getServerSession } from 'next-auth' import { NextResponse } from 'next/server' @@ -10,8 +11,8 @@ export async function POST(req: Request) { const { priceId, allowTrial } = body const stripeConfig: Stripe.Checkout.SessionCreateParams = { - success_url: 'http://localhost:3000/home', - cancel_url: 'http://localhost:3000', + success_url: config.nextAuthUrl + '/home', + cancel_url: config.nextAuthUrl, payment_method_types: ['card'], mode: 'subscription', billing_address_collection: 'auto', diff --git a/src/db/migrations/0027_fat_muscular_nullable.sql b/src/db/migrations/0027_fat_muscular_nullable.sql new file mode 100644 index 00000000..fca53150 --- /dev/null +++ b/src/db/migrations/0027_fat_muscular_nullable.sql @@ -0,0 +1,2 @@ +ALTER TABLE "UserDetail" ALTER COLUMN "body_fat" DROP NOT NULL;--> statement-breakpoint +ALTER TABLE "UserDetail" ALTER COLUMN "muscular_mass" DROP NOT NULL; \ No newline at end of file diff --git a/src/db/migrations/meta/0000_snapshot.json b/src/db/migrations/meta/0000_snapshot.json index 92def67f..3e895213 100644 --- a/src/db/migrations/meta/0000_snapshot.json +++ b/src/db/migrations/meta/0000_snapshot.json @@ -1,10 +1,8 @@ { - "id": "7fb4f41d-f861-46e4-91b9-65c5c4c826e0", - "prevId": "00000000-0000-0000-0000-000000000000", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -74,29 +72,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -156,7 +154,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -197,21 +195,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -269,25 +267,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -295,8 +293,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "7fb4f41d-f861-46e4-91b9-65c5c4c826e0", + "prevId": "00000000-0000-0000-0000-000000000000" } \ No newline at end of file diff --git a/src/db/migrations/meta/0001_snapshot.json b/src/db/migrations/meta/0001_snapshot.json index 6a6627c6..f5188207 100644 --- a/src/db/migrations/meta/0001_snapshot.json +++ b/src/db/migrations/meta/0001_snapshot.json @@ -1,10 +1,8 @@ { - "id": "75205734-1989-488a-9e88-23212bded435", - "prevId": "7fb4f41d-f861-46e4-91b9-65c5c4c826e0", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -74,29 +72,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -156,7 +154,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -197,21 +195,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -269,25 +267,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -295,8 +293,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "75205734-1989-488a-9e88-23212bded435", + "prevId": "7fb4f41d-f861-46e4-91b9-65c5c4c826e0" } \ No newline at end of file diff --git a/src/db/migrations/meta/0002_snapshot.json b/src/db/migrations/meta/0002_snapshot.json index f2b50830..2de1ab4c 100644 --- a/src/db/migrations/meta/0002_snapshot.json +++ b/src/db/migrations/meta/0002_snapshot.json @@ -1,10 +1,8 @@ { - "id": "eb7c4469-41fe-44c9-9a89-9b9ef66923aa", - "prevId": "75205734-1989-488a-9e88-23212bded435", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -74,29 +72,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -156,7 +154,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -197,21 +195,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -269,29 +267,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserReminders": { + "public.UserReminders": { "name": "UserReminders", "schema": "", "columns": { @@ -343,25 +341,25 @@ "UserReminders_id_user_User_id_user_fk": { "name": "UserReminders_id_user_User_id_user_fk", "tableFrom": "UserReminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserReminders_id_user_unique": { "name": "UserReminders_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -369,8 +367,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "eb7c4469-41fe-44c9-9a89-9b9ef66923aa", + "prevId": "75205734-1989-488a-9e88-23212bded435" } \ No newline at end of file diff --git a/src/db/migrations/meta/0003_snapshot.json b/src/db/migrations/meta/0003_snapshot.json index c92d1de5..e2743685 100644 --- a/src/db/migrations/meta/0003_snapshot.json +++ b/src/db/migrations/meta/0003_snapshot.json @@ -1,10 +1,8 @@ { - "id": "146d67e2-8100-4d66-aa16-450e960a8f31", - "prevId": "eb7c4469-41fe-44c9-9a89-9b9ef66923aa", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -56,29 +54,29 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Reminders_id_user_unique": { "name": "Reminders_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -148,29 +146,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -230,7 +228,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -271,21 +269,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -343,25 +341,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -369,8 +367,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "146d67e2-8100-4d66-aa16-450e960a8f31", + "prevId": "eb7c4469-41fe-44c9-9a89-9b9ef66923aa" } \ No newline at end of file diff --git a/src/db/migrations/meta/0004_snapshot.json b/src/db/migrations/meta/0004_snapshot.json index 076e2abc..c70ad607 100644 --- a/src/db/migrations/meta/0004_snapshot.json +++ b/src/db/migrations/meta/0004_snapshot.json @@ -1,10 +1,8 @@ { - "id": "4ea47c26-e0d2-46da-bf06-04fd02a8cdd4", - "prevId": "146d67e2-8100-4d66-aa16-450e960a8f31", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -56,29 +54,29 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Reminders_id_user_unique": { "name": "Reminders_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -148,29 +146,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -230,7 +228,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -271,21 +269,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -343,25 +341,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -369,8 +367,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "4ea47c26-e0d2-46da-bf06-04fd02a8cdd4", + "prevId": "146d67e2-8100-4d66-aa16-450e960a8f31" } \ No newline at end of file diff --git a/src/db/migrations/meta/0005_snapshot.json b/src/db/migrations/meta/0005_snapshot.json index aa179185..402304ca 100644 --- a/src/db/migrations/meta/0005_snapshot.json +++ b/src/db/migrations/meta/0005_snapshot.json @@ -1,10 +1,8 @@ { - "id": "ec4ef6dd-3205-4360-a35d-2b2d4923bb73", - "prevId": "4ea47c26-e0d2-46da-bf06-04fd02a8cdd4", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -56,21 +54,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -140,29 +138,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -222,7 +220,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -263,21 +261,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -335,25 +333,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -361,8 +359,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "ec4ef6dd-3205-4360-a35d-2b2d4923bb73", + "prevId": "4ea47c26-e0d2-46da-bf06-04fd02a8cdd4" } \ No newline at end of file diff --git a/src/db/migrations/meta/0006_snapshot.json b/src/db/migrations/meta/0006_snapshot.json index 097d8972..191256dc 100644 --- a/src/db/migrations/meta/0006_snapshot.json +++ b/src/db/migrations/meta/0006_snapshot.json @@ -1,10 +1,8 @@ { - "id": "3edda507-f6d4-4f98-a041-f1207f31d3de", - "prevId": "ec4ef6dd-3205-4360-a35d-2b2d4923bb73", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -50,21 +48,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -116,21 +114,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -200,29 +198,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -282,7 +280,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -323,21 +321,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -395,25 +393,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -421,8 +419,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "3edda507-f6d4-4f98-a041-f1207f31d3de", + "prevId": "ec4ef6dd-3205-4360-a35d-2b2d4923bb73" } \ No newline at end of file diff --git a/src/db/migrations/meta/0007_snapshot.json b/src/db/migrations/meta/0007_snapshot.json index d250adcf..f8e0f0f2 100644 --- a/src/db/migrations/meta/0007_snapshot.json +++ b/src/db/migrations/meta/0007_snapshot.json @@ -1,10 +1,8 @@ { - "id": "b5d6fda5-4a23-4704-95fd-ae1a7b47a92c", - "prevId": "3edda507-f6d4-4f98-a041-f1207f31d3de", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -50,21 +48,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -116,21 +114,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -200,29 +198,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -282,7 +280,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -323,21 +321,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -395,25 +393,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -421,8 +419,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "b5d6fda5-4a23-4704-95fd-ae1a7b47a92c", + "prevId": "3edda507-f6d4-4f98-a041-f1207f31d3de" } \ No newline at end of file diff --git a/src/db/migrations/meta/0008_snapshot.json b/src/db/migrations/meta/0008_snapshot.json index 0996ac2d..532c0c51 100644 --- a/src/db/migrations/meta/0008_snapshot.json +++ b/src/db/migrations/meta/0008_snapshot.json @@ -1,10 +1,8 @@ { - "id": "6ce29d5d-149b-45e2-9a82-4591e22ed3d7", - "prevId": "b5d6fda5-4a23-4704-95fd-ae1a7b47a92c", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -56,21 +54,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -122,21 +120,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -206,29 +204,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -288,7 +286,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -329,21 +327,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -401,25 +399,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -427,8 +425,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "6ce29d5d-149b-45e2-9a82-4591e22ed3d7", + "prevId": "b5d6fda5-4a23-4704-95fd-ae1a7b47a92c" } \ No newline at end of file diff --git a/src/db/migrations/meta/0009_snapshot.json b/src/db/migrations/meta/0009_snapshot.json index 69b81114..290bbb6b 100644 --- a/src/db/migrations/meta/0009_snapshot.json +++ b/src/db/migrations/meta/0009_snapshot.json @@ -1,10 +1,8 @@ { - "id": "292b83da-a418-4e26-bd73-58edb69a07c3", - "prevId": "6ce29d5d-149b-45e2-9a82-4591e22ed3d7", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -56,21 +54,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -122,21 +120,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -206,29 +204,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -288,7 +286,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -329,21 +327,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -401,25 +399,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -427,8 +425,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "292b83da-a418-4e26-bd73-58edb69a07c3", + "prevId": "6ce29d5d-149b-45e2-9a82-4591e22ed3d7" } \ No newline at end of file diff --git a/src/db/migrations/meta/0010_snapshot.json b/src/db/migrations/meta/0010_snapshot.json index 8ff84e4d..f1c5a481 100644 --- a/src/db/migrations/meta/0010_snapshot.json +++ b/src/db/migrations/meta/0010_snapshot.json @@ -1,10 +1,8 @@ { - "id": "a8125ed2-8d51-44cb-add8-c43f2b6e36ae", - "prevId": "292b83da-a418-4e26-bd73-58edb69a07c3", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -156,21 +154,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -240,29 +238,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -322,7 +320,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -363,21 +361,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -435,25 +433,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -461,8 +459,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "a8125ed2-8d51-44cb-add8-c43f2b6e36ae", + "prevId": "292b83da-a418-4e26-bd73-58edb69a07c3" } \ No newline at end of file diff --git a/src/db/migrations/meta/0011_snapshot.json b/src/db/migrations/meta/0011_snapshot.json index 95ba9c7b..958dfa9d 100644 --- a/src/db/migrations/meta/0011_snapshot.json +++ b/src/db/migrations/meta/0011_snapshot.json @@ -1,10 +1,8 @@ { - "id": "48ca3ab2-4408-4d73-8a2f-fcfe834843b5", - "prevId": "a8125ed2-8d51-44cb-add8-c43f2b6e36ae", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -156,21 +154,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -240,29 +238,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -322,7 +320,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -363,21 +361,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -435,25 +433,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -461,8 +459,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "48ca3ab2-4408-4d73-8a2f-fcfe834843b5", + "prevId": "a8125ed2-8d51-44cb-add8-c43f2b6e36ae" } \ No newline at end of file diff --git a/src/db/migrations/meta/0012_snapshot.json b/src/db/migrations/meta/0012_snapshot.json index bbcf4099..09e50a9f 100644 --- a/src/db/migrations/meta/0012_snapshot.json +++ b/src/db/migrations/meta/0012_snapshot.json @@ -1,10 +1,8 @@ { - "id": "4cd8769a-86fb-4a54-9005-afc475b5034c", - "prevId": "48ca3ab2-4408-4d73-8a2f-fcfe834843b5", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -156,21 +154,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -204,29 +202,29 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Allergies_id_medical_profile_unique": { "name": "Allergies_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -254,29 +252,29 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "ChronicalDesease_id_medical_profile_unique": { "name": "ChronicalDesease_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -304,29 +302,29 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Disability_id_medical_profile_unique": { "name": "Disability_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -378,29 +376,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -446,29 +444,29 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Medicines_id_medical_profile_unique": { "name": "Medicines_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -538,29 +536,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -620,7 +618,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -661,21 +659,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -733,25 +731,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -759,8 +757,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "4cd8769a-86fb-4a54-9005-afc475b5034c", + "prevId": "48ca3ab2-4408-4d73-8a2f-fcfe834843b5" } \ No newline at end of file diff --git a/src/db/migrations/meta/0013_snapshot.json b/src/db/migrations/meta/0013_snapshot.json index b0cc86e6..1b68b74c 100644 --- a/src/db/migrations/meta/0013_snapshot.json +++ b/src/db/migrations/meta/0013_snapshot.json @@ -1,10 +1,8 @@ { - "id": "51570c75-f225-4cfb-95cb-228a00f0d951", - "prevId": "4cd8769a-86fb-4a54-9005-afc475b5034c", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -156,21 +154,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -204,29 +202,29 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Allergies_id_medical_profile_unique": { "name": "Allergies_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -254,29 +252,29 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "ChronicalDesease_id_medical_profile_unique": { "name": "ChronicalDesease_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -304,29 +302,29 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Disability_id_medical_profile_unique": { "name": "Disability_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -378,29 +376,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -446,29 +444,29 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Medicines_id_medical_profile_unique": { "name": "Medicines_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -538,29 +536,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -620,7 +618,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -661,21 +659,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -733,25 +731,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -759,8 +757,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "51570c75-f225-4cfb-95cb-228a00f0d951", + "prevId": "4cd8769a-86fb-4a54-9005-afc475b5034c" } \ No newline at end of file diff --git a/src/db/migrations/meta/0014_snapshot.json b/src/db/migrations/meta/0014_snapshot.json index 0480eebc..d4f5145d 100644 --- a/src/db/migrations/meta/0014_snapshot.json +++ b/src/db/migrations/meta/0014_snapshot.json @@ -1,10 +1,8 @@ { - "id": "ae0d25ff-11d2-4087-8807-f61b0d42ef3f", - "prevId": "51570c75-f225-4cfb-95cb-228a00f0d951", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -156,21 +154,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -204,29 +202,29 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Allergies_id_medical_profile_unique": { "name": "Allergies_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -254,29 +252,29 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "ChronicalDesease_id_medical_profile_unique": { "name": "ChronicalDesease_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -304,29 +302,29 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Disability_id_medical_profile_unique": { "name": "Disability_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -378,29 +376,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -446,29 +444,29 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "Medicines_id_medical_profile_unique": { "name": "Medicines_id_medical_profile_unique", - "nullsNotDistinct": false, "columns": [ "id_medical_profile" - ] + ], + "nullsNotDistinct": false } } }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -538,29 +536,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -620,7 +618,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -661,21 +659,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -733,25 +731,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -759,8 +757,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "ae0d25ff-11d2-4087-8807-f61b0d42ef3f", + "prevId": "51570c75-f225-4cfb-95cb-228a00f0d951" } \ No newline at end of file diff --git a/src/db/migrations/meta/0015_snapshot.json b/src/db/migrations/meta/0015_snapshot.json index 62ba0b3e..8fadbfa3 100644 --- a/src/db/migrations/meta/0015_snapshot.json +++ b/src/db/migrations/meta/0015_snapshot.json @@ -1,10 +1,8 @@ { - "id": "c1f7a89f-1ec5-4bbc-acb3-7590047cc39d", - "prevId": "ae0d25ff-11d2-4087-8807-f61b0d42ef3f", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -156,21 +154,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -204,21 +202,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -246,21 +244,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -288,21 +286,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -354,29 +352,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -422,21 +420,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -506,29 +504,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -588,7 +586,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -629,21 +627,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -701,25 +699,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -727,8 +725,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "c1f7a89f-1ec5-4bbc-acb3-7590047cc39d", + "prevId": "ae0d25ff-11d2-4087-8807-f61b0d42ef3f" } \ No newline at end of file diff --git a/src/db/migrations/meta/0016_snapshot.json b/src/db/migrations/meta/0016_snapshot.json index cc1a9fb0..6217bc75 100644 --- a/src/db/migrations/meta/0016_snapshot.json +++ b/src/db/migrations/meta/0016_snapshot.json @@ -1,10 +1,8 @@ { - "id": "abf4fc12-8278-4199-803e-aeeb3cce7a42", - "prevId": "c1f7a89f-1ec5-4bbc-acb3-7590047cc39d", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -156,21 +154,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -204,21 +202,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -246,21 +244,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -288,21 +286,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -343,21 +341,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -404,34 +402,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -483,29 +481,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -551,21 +549,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -635,29 +633,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -717,7 +715,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Register": { + "public.Register": { "name": "Register", "schema": "", "columns": { @@ -764,21 +762,21 @@ "Register_id_user_User_id_user_fk": { "name": "Register_id_user_User_id_user_fk", "tableFrom": "Register", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -819,21 +817,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -891,25 +889,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -917,8 +915,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "abf4fc12-8278-4199-803e-aeeb3cce7a42", + "prevId": "c1f7a89f-1ec5-4bbc-acb3-7590047cc39d" } \ No newline at end of file diff --git a/src/db/migrations/meta/0017_snapshot.json b/src/db/migrations/meta/0017_snapshot.json index a0db4aa1..e77293b3 100644 --- a/src/db/migrations/meta/0017_snapshot.json +++ b/src/db/migrations/meta/0017_snapshot.json @@ -1,10 +1,8 @@ { - "id": "bfdc4d0a-5cd9-4e9d-83a4-49383012e05d", - "prevId": "abf4fc12-8278-4199-803e-aeeb3cce7a42", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -156,21 +154,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -204,21 +202,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -246,21 +244,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -288,21 +286,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -343,21 +341,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -404,34 +402,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -483,29 +481,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -551,21 +549,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -635,29 +633,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -717,7 +715,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -764,21 +762,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -819,21 +817,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -891,25 +889,25 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } } @@ -917,8 +915,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "bfdc4d0a-5cd9-4e9d-83a4-49383012e05d", + "prevId": "abf4fc12-8278-4199-803e-aeeb3cce7a42" } \ No newline at end of file diff --git a/src/db/migrations/meta/0018_snapshot.json b/src/db/migrations/meta/0018_snapshot.json index 6dba12bb..41dd4d18 100644 --- a/src/db/migrations/meta/0018_snapshot.json +++ b/src/db/migrations/meta/0018_snapshot.json @@ -1,10 +1,8 @@ { - "id": "3609d7ba-0788-4fec-a8d7-792da09e484a", - "prevId": "bfdc4d0a-5cd9-4e9d-83a4-49383012e05d", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -156,21 +154,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -204,21 +202,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -246,21 +244,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -288,21 +286,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -343,21 +341,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Followers": { + "public.Followers": { "name": "Followers", "schema": "", "columns": { @@ -385,34 +383,34 @@ "Followers_user_id_User_id_user_fk": { "name": "Followers_user_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Followers_follower_id_User_id_user_fk": { "name": "Followers_follower_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "follower_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Following": { + "public.Following": { "name": "Following", "schema": "", "columns": { @@ -440,34 +438,34 @@ "Following_user_id_User_id_user_fk": { "name": "Following_user_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Following_following_id_User_id_user_fk": { "name": "Following_following_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "following_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -514,34 +512,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -593,29 +591,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -661,21 +659,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -745,29 +743,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PostLikes": { + "public.PostLikes": { "name": "PostLikes", "schema": "", "columns": { @@ -795,34 +793,34 @@ "PostLikes_post_id_Post_id_posts_fk": { "name": "PostLikes_post_id_Post_id_posts_fk", "tableFrom": "PostLikes", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "PostLikes_user_id_User_id_user_fk": { "name": "PostLikes_user_id_User_id_user_fk", "tableFrom": "PostLikes", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Post": { + "public.Post": { "name": "Post", "schema": "", "columns": { @@ -869,21 +867,21 @@ "Post_creator_id_User_id_user_fk": { "name": "Post_creator_id_User_id_user_fk", "tableFrom": "Post", - "tableTo": "User", "columnsFrom": [ "creator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -943,7 +941,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -990,21 +988,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "SavedPosts": { + "public.SavedPosts": { "name": "SavedPosts", "schema": "", "columns": { @@ -1032,34 +1030,34 @@ "SavedPosts_user_id_User_id_user_fk": { "name": "SavedPosts_user_id_User_id_user_fk", "tableFrom": "SavedPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "SavedPosts_post_id_Post_id_posts_fk": { "name": "SavedPosts_post_id_Post_id_posts_fk", "tableFrom": "SavedPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -1119,21 +1117,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -1191,29 +1189,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserPosts": { + "public.UserPosts": { "name": "UserPosts", "schema": "", "columns": { @@ -1241,28 +1239,28 @@ "UserPosts_user_id_User_id_user_fk": { "name": "UserPosts_user_id_User_id_user_fk", "tableFrom": "UserPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "UserPosts_post_id_Post_id_posts_fk": { "name": "UserPosts_post_id_Post_id_posts_fk", "tableFrom": "UserPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, @@ -1272,8 +1270,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "3609d7ba-0788-4fec-a8d7-792da09e484a", + "prevId": "bfdc4d0a-5cd9-4e9d-83a4-49383012e05d" } \ No newline at end of file diff --git a/src/db/migrations/meta/0019_snapshot.json b/src/db/migrations/meta/0019_snapshot.json index 3620ae6b..a5be8208 100644 --- a/src/db/migrations/meta/0019_snapshot.json +++ b/src/db/migrations/meta/0019_snapshot.json @@ -1,10 +1,8 @@ { - "id": "2c60e0a6-5643-4ec8-bd7e-0ec496b933a9", - "prevId": "3609d7ba-0788-4fec-a8d7-792da09e484a", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -162,21 +160,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -210,21 +208,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -252,21 +250,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -294,21 +292,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -349,21 +347,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Followers": { + "public.Followers": { "name": "Followers", "schema": "", "columns": { @@ -391,34 +389,34 @@ "Followers_user_id_User_id_user_fk": { "name": "Followers_user_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Followers_follower_id_User_id_user_fk": { "name": "Followers_follower_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "follower_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Following": { + "public.Following": { "name": "Following", "schema": "", "columns": { @@ -446,34 +444,34 @@ "Following_user_id_User_id_user_fk": { "name": "Following_user_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Following_following_id_User_id_user_fk": { "name": "Following_following_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "following_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -520,34 +518,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -599,29 +597,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -667,21 +665,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -751,29 +749,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PostLikes": { + "public.PostLikes": { "name": "PostLikes", "schema": "", "columns": { @@ -801,34 +799,34 @@ "PostLikes_post_id_Post_id_posts_fk": { "name": "PostLikes_post_id_Post_id_posts_fk", "tableFrom": "PostLikes", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "PostLikes_user_id_User_id_user_fk": { "name": "PostLikes_user_id_User_id_user_fk", "tableFrom": "PostLikes", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Post": { + "public.Post": { "name": "Post", "schema": "", "columns": { @@ -875,21 +873,21 @@ "Post_creator_id_User_id_user_fk": { "name": "Post_creator_id_User_id_user_fk", "tableFrom": "Post", - "tableTo": "User", "columnsFrom": [ "creator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -949,7 +947,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -996,21 +994,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "SavedPosts": { + "public.SavedPosts": { "name": "SavedPosts", "schema": "", "columns": { @@ -1038,34 +1036,34 @@ "SavedPosts_user_id_User_id_user_fk": { "name": "SavedPosts_user_id_User_id_user_fk", "tableFrom": "SavedPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "SavedPosts_post_id_Post_id_posts_fk": { "name": "SavedPosts_post_id_Post_id_posts_fk", "tableFrom": "SavedPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -1125,21 +1123,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -1197,29 +1195,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "restrict", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "restrict" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserPosts": { + "public.UserPosts": { "name": "UserPosts", "schema": "", "columns": { @@ -1247,28 +1245,28 @@ "UserPosts_user_id_User_id_user_fk": { "name": "UserPosts_user_id_User_id_user_fk", "tableFrom": "UserPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "UserPosts_post_id_Post_id_posts_fk": { "name": "UserPosts_post_id_Post_id_posts_fk", "tableFrom": "UserPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, @@ -1278,8 +1276,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "2c60e0a6-5643-4ec8-bd7e-0ec496b933a9", + "prevId": "3609d7ba-0788-4fec-a8d7-792da09e484a" } \ No newline at end of file diff --git a/src/db/migrations/meta/0020_snapshot.json b/src/db/migrations/meta/0020_snapshot.json index 8f1b6856..5a4f61a3 100644 --- a/src/db/migrations/meta/0020_snapshot.json +++ b/src/db/migrations/meta/0020_snapshot.json @@ -1,10 +1,8 @@ { - "id": "b6f2376d-34d1-49b0-bcf4-bc03475a2498", - "prevId": "2c60e0a6-5643-4ec8-bd7e-0ec496b933a9", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -162,21 +160,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -210,21 +208,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -252,21 +250,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -294,21 +292,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -349,21 +347,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Followers": { + "public.Followers": { "name": "Followers", "schema": "", "columns": { @@ -391,34 +389,34 @@ "Followers_user_id_User_id_user_fk": { "name": "Followers_user_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Followers_follower_id_User_id_user_fk": { "name": "Followers_follower_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "follower_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Following": { + "public.Following": { "name": "Following", "schema": "", "columns": { @@ -446,34 +444,34 @@ "Following_user_id_User_id_user_fk": { "name": "Following_user_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Following_following_id_User_id_user_fk": { "name": "Following_following_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "following_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -520,34 +518,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -599,29 +597,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -667,21 +665,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -751,29 +749,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PostLikes": { + "public.PostLikes": { "name": "PostLikes", "schema": "", "columns": { @@ -801,34 +799,34 @@ "PostLikes_post_id_Post_id_posts_fk": { "name": "PostLikes_post_id_Post_id_posts_fk", "tableFrom": "PostLikes", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "PostLikes_user_id_User_id_user_fk": { "name": "PostLikes_user_id_User_id_user_fk", "tableFrom": "PostLikes", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Post": { + "public.Post": { "name": "Post", "schema": "", "columns": { @@ -875,21 +873,21 @@ "Post_creator_id_User_id_user_fk": { "name": "Post_creator_id_User_id_user_fk", "tableFrom": "Post", - "tableTo": "User", "columnsFrom": [ "creator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -949,7 +947,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -996,21 +994,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "SavedPosts": { + "public.SavedPosts": { "name": "SavedPosts", "schema": "", "columns": { @@ -1038,34 +1036,34 @@ "SavedPosts_user_id_User_id_user_fk": { "name": "SavedPosts_user_id_User_id_user_fk", "tableFrom": "SavedPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "SavedPosts_post_id_Post_id_posts_fk": { "name": "SavedPosts_post_id_Post_id_posts_fk", "tableFrom": "SavedPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -1125,21 +1123,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -1197,29 +1195,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserPosts": { + "public.UserPosts": { "name": "UserPosts", "schema": "", "columns": { @@ -1247,28 +1245,28 @@ "UserPosts_user_id_User_id_user_fk": { "name": "UserPosts_user_id_User_id_user_fk", "tableFrom": "UserPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserPosts_post_id_Post_id_posts_fk": { "name": "UserPosts_post_id_Post_id_posts_fk", "tableFrom": "UserPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, @@ -1278,8 +1276,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "b6f2376d-34d1-49b0-bcf4-bc03475a2498", + "prevId": "2c60e0a6-5643-4ec8-bd7e-0ec496b933a9" } \ No newline at end of file diff --git a/src/db/migrations/meta/0021_snapshot.json b/src/db/migrations/meta/0021_snapshot.json index 6b598e57..ca03a5a7 100644 --- a/src/db/migrations/meta/0021_snapshot.json +++ b/src/db/migrations/meta/0021_snapshot.json @@ -1,10 +1,8 @@ { - "id": "4792a3e5-1a7e-4551-81fb-ea673fd83d43", - "prevId": "b6f2376d-34d1-49b0-bcf4-bc03475a2498", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -162,21 +160,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -210,21 +208,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -252,21 +250,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Comments": { + "public.Comments": { "name": "Comments", "schema": "", "columns": { @@ -307,34 +305,34 @@ "Comments_post_id_Post_id_posts_fk": { "name": "Comments_post_id_Post_id_posts_fk", "tableFrom": "Comments", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Comments_user_id_User_id_user_fk": { "name": "Comments_user_id_User_id_user_fk", "tableFrom": "Comments", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -362,21 +360,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -417,21 +415,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Followers": { + "public.Followers": { "name": "Followers", "schema": "", "columns": { @@ -459,34 +457,34 @@ "Followers_user_id_User_id_user_fk": { "name": "Followers_user_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Followers_follower_id_User_id_user_fk": { "name": "Followers_follower_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "follower_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Following": { + "public.Following": { "name": "Following", "schema": "", "columns": { @@ -514,34 +512,34 @@ "Following_user_id_User_id_user_fk": { "name": "Following_user_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Following_following_id_User_id_user_fk": { "name": "Following_following_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "following_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -588,34 +586,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -667,29 +665,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -735,21 +733,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -819,29 +817,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PostLikes": { + "public.PostLikes": { "name": "PostLikes", "schema": "", "columns": { @@ -869,34 +867,34 @@ "PostLikes_post_id_Post_id_posts_fk": { "name": "PostLikes_post_id_Post_id_posts_fk", "tableFrom": "PostLikes", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "PostLikes_user_id_User_id_user_fk": { "name": "PostLikes_user_id_User_id_user_fk", "tableFrom": "PostLikes", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Post": { + "public.Post": { "name": "Post", "schema": "", "columns": { @@ -943,21 +941,21 @@ "Post_creator_id_User_id_user_fk": { "name": "Post_creator_id_User_id_user_fk", "tableFrom": "Post", - "tableTo": "User", "columnsFrom": [ "creator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -1017,7 +1015,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -1064,21 +1062,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -1132,21 +1130,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -1204,29 +1202,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserPosts": { + "public.UserPosts": { "name": "UserPosts", "schema": "", "columns": { @@ -1254,28 +1252,28 @@ "UserPosts_user_id_User_id_user_fk": { "name": "UserPosts_user_id_User_id_user_fk", "tableFrom": "UserPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserPosts_post_id_Post_id_posts_fk": { "name": "UserPosts_post_id_Post_id_posts_fk", "tableFrom": "UserPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, @@ -1285,8 +1283,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "4792a3e5-1a7e-4551-81fb-ea673fd83d43", + "prevId": "b6f2376d-34d1-49b0-bcf4-bc03475a2498" } \ No newline at end of file diff --git a/src/db/migrations/meta/0022_snapshot.json b/src/db/migrations/meta/0022_snapshot.json index 4a685f8f..499e5452 100644 --- a/src/db/migrations/meta/0022_snapshot.json +++ b/src/db/migrations/meta/0022_snapshot.json @@ -1,10 +1,8 @@ { - "id": "165988d6-e1ce-429e-abac-8793831d97bf", - "prevId": "4792a3e5-1a7e-4551-81fb-ea673fd83d43", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -162,21 +160,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -210,21 +208,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -252,21 +250,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Comments": { + "public.Comments": { "name": "Comments", "schema": "", "columns": { @@ -307,34 +305,34 @@ "Comments_post_id_Post_id_posts_fk": { "name": "Comments_post_id_Post_id_posts_fk", "tableFrom": "Comments", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Comments_user_id_User_id_user_fk": { "name": "Comments_user_id_User_id_user_fk", "tableFrom": "Comments", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -362,21 +360,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -417,21 +415,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Followers": { + "public.Followers": { "name": "Followers", "schema": "", "columns": { @@ -459,34 +457,34 @@ "Followers_user_id_User_id_user_fk": { "name": "Followers_user_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Followers_follower_id_User_id_user_fk": { "name": "Followers_follower_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "follower_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Following": { + "public.Following": { "name": "Following", "schema": "", "columns": { @@ -514,34 +512,34 @@ "Following_user_id_User_id_user_fk": { "name": "Following_user_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Following_following_id_User_id_user_fk": { "name": "Following_following_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "following_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -588,34 +586,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -667,29 +665,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -735,21 +733,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -819,29 +817,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PostLikes": { + "public.PostLikes": { "name": "PostLikes", "schema": "", "columns": { @@ -869,34 +867,34 @@ "PostLikes_post_id_Post_id_posts_fk": { "name": "PostLikes_post_id_Post_id_posts_fk", "tableFrom": "PostLikes", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "PostLikes_user_id_User_id_user_fk": { "name": "PostLikes_user_id_User_id_user_fk", "tableFrom": "PostLikes", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Post": { + "public.Post": { "name": "Post", "schema": "", "columns": { @@ -943,21 +941,21 @@ "Post_creator_id_User_id_user_fk": { "name": "Post_creator_id_User_id_user_fk", "tableFrom": "Post", - "tableTo": "User", "columnsFrom": [ "creator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -1017,7 +1015,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -1064,21 +1062,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -1144,21 +1142,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -1216,29 +1214,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserPosts": { + "public.UserPosts": { "name": "UserPosts", "schema": "", "columns": { @@ -1266,28 +1264,28 @@ "UserPosts_user_id_User_id_user_fk": { "name": "UserPosts_user_id_User_id_user_fk", "tableFrom": "UserPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserPosts_post_id_Post_id_posts_fk": { "name": "UserPosts_post_id_Post_id_posts_fk", "tableFrom": "UserPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, @@ -1297,8 +1295,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "165988d6-e1ce-429e-abac-8793831d97bf", + "prevId": "4792a3e5-1a7e-4551-81fb-ea673fd83d43" } \ No newline at end of file diff --git a/src/db/migrations/meta/0023_snapshot.json b/src/db/migrations/meta/0023_snapshot.json index 5b81ae0b..826e00e9 100644 --- a/src/db/migrations/meta/0023_snapshot.json +++ b/src/db/migrations/meta/0023_snapshot.json @@ -1,10 +1,8 @@ { - "id": "40600999-2215-4037-8c2e-9f5c5e8019f4", - "prevId": "165988d6-e1ce-429e-abac-8793831d97bf", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -162,21 +160,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -210,21 +208,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Badges": { + "public.Badges": { "name": "Badges", "schema": "", "columns": { @@ -258,7 +256,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -286,21 +284,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Comments": { + "public.Comments": { "name": "Comments", "schema": "", "columns": { @@ -341,34 +339,34 @@ "Comments_post_id_Post_id_posts_fk": { "name": "Comments_post_id_Post_id_posts_fk", "tableFrom": "Comments", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Comments_user_id_User_id_user_fk": { "name": "Comments_user_id_User_id_user_fk", "tableFrom": "Comments", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -396,21 +394,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -451,21 +449,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Followers": { + "public.Followers": { "name": "Followers", "schema": "", "columns": { @@ -493,34 +491,34 @@ "Followers_user_id_User_id_user_fk": { "name": "Followers_user_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Followers_follower_id_User_id_user_fk": { "name": "Followers_follower_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "follower_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Following": { + "public.Following": { "name": "Following", "schema": "", "columns": { @@ -548,34 +546,34 @@ "Following_user_id_User_id_user_fk": { "name": "Following_user_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Following_following_id_User_id_user_fk": { "name": "Following_following_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "following_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -622,34 +620,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -701,29 +699,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -769,21 +767,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MonthlyChallenge": { + "public.MonthlyChallenge": { "name": "MonthlyChallenge", "schema": "", "columns": { @@ -830,7 +828,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -900,29 +898,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PostLikes": { + "public.PostLikes": { "name": "PostLikes", "schema": "", "columns": { @@ -950,34 +948,34 @@ "PostLikes_post_id_Post_id_posts_fk": { "name": "PostLikes_post_id_Post_id_posts_fk", "tableFrom": "PostLikes", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "PostLikes_user_id_User_id_user_fk": { "name": "PostLikes_user_id_User_id_user_fk", "tableFrom": "PostLikes", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Post": { + "public.Post": { "name": "Post", "schema": "", "columns": { @@ -1024,21 +1022,21 @@ "Post_creator_id_User_id_user_fk": { "name": "Post_creator_id_User_id_user_fk", "tableFrom": "Post", - "tableTo": "User", "columnsFrom": [ "creator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -1098,7 +1096,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -1145,21 +1143,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -1231,21 +1229,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -1303,29 +1301,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserPoints": { + "public.UserPoints": { "name": "UserPoints", "schema": "", "columns": { @@ -1361,21 +1359,21 @@ "UserPoints_id_user_User_id_user_fk": { "name": "UserPoints_id_user_User_id_user_fk", "tableFrom": "UserPoints", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "UserPosts": { + "public.UserPosts": { "name": "UserPosts", "schema": "", "columns": { @@ -1403,28 +1401,28 @@ "UserPosts_user_id_User_id_user_fk": { "name": "UserPosts_user_id_User_id_user_fk", "tableFrom": "UserPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserPosts_post_id_Post_id_posts_fk": { "name": "UserPosts_post_id_Post_id_posts_fk", "tableFrom": "UserPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, @@ -1434,8 +1432,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "40600999-2215-4037-8c2e-9f5c5e8019f4", + "prevId": "165988d6-e1ce-429e-abac-8793831d97bf" } \ No newline at end of file diff --git a/src/db/migrations/meta/0024_snapshot.json b/src/db/migrations/meta/0024_snapshot.json index 2d962ade..271a1af8 100644 --- a/src/db/migrations/meta/0024_snapshot.json +++ b/src/db/migrations/meta/0024_snapshot.json @@ -1,10 +1,8 @@ { - "id": "8a9a3741-e83d-4eaa-938b-d1ebaeb168ba", - "prevId": "40600999-2215-4037-8c2e-9f5c5e8019f4", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -162,21 +160,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -210,21 +208,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Badges": { + "public.Badges": { "name": "Badges", "schema": "", "columns": { @@ -252,7 +250,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -280,21 +278,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Comments": { + "public.Comments": { "name": "Comments", "schema": "", "columns": { @@ -335,34 +333,34 @@ "Comments_post_id_Post_id_posts_fk": { "name": "Comments_post_id_Post_id_posts_fk", "tableFrom": "Comments", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Comments_user_id_User_id_user_fk": { "name": "Comments_user_id_User_id_user_fk", "tableFrom": "Comments", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -390,21 +388,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -445,21 +443,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Followers": { + "public.Followers": { "name": "Followers", "schema": "", "columns": { @@ -487,34 +485,34 @@ "Followers_user_id_User_id_user_fk": { "name": "Followers_user_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Followers_follower_id_User_id_user_fk": { "name": "Followers_follower_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "follower_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Following": { + "public.Following": { "name": "Following", "schema": "", "columns": { @@ -542,34 +540,34 @@ "Following_user_id_User_id_user_fk": { "name": "Following_user_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Following_following_id_User_id_user_fk": { "name": "Following_following_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "following_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -616,34 +614,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -695,29 +693,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -763,21 +761,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MonthlyChallenge": { + "public.MonthlyChallenge": { "name": "MonthlyChallenge", "schema": "", "columns": { @@ -824,7 +822,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -894,29 +892,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PostLikes": { + "public.PostLikes": { "name": "PostLikes", "schema": "", "columns": { @@ -944,34 +942,34 @@ "PostLikes_post_id_Post_id_posts_fk": { "name": "PostLikes_post_id_Post_id_posts_fk", "tableFrom": "PostLikes", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "PostLikes_user_id_User_id_user_fk": { "name": "PostLikes_user_id_User_id_user_fk", "tableFrom": "PostLikes", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Post": { + "public.Post": { "name": "Post", "schema": "", "columns": { @@ -1018,21 +1016,21 @@ "Post_creator_id_User_id_user_fk": { "name": "Post_creator_id_User_id_user_fk", "tableFrom": "Post", - "tableTo": "User", "columnsFrom": [ "creator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -1092,7 +1090,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -1139,21 +1137,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -1225,21 +1223,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserBadges": { + "public.UserBadges": { "name": "UserBadges", "schema": "", "columns": { @@ -1267,43 +1265,43 @@ "UserBadges_user_id_User_id_user_fk": { "name": "UserBadges_user_id_User_id_user_fk", "tableFrom": "UserBadges", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserBadges_badge_id_Badges_id_badge_fk": { "name": "UserBadges_badge_id_Badges_id_badge_fk", "tableFrom": "UserBadges", - "tableTo": "Badges", "columnsFrom": [ "badge_id" ], + "tableTo": "Badges", "columnsTo": [ "id_badge" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "unique_user_badge": { "name": "unique_user_badge", - "nullsNotDistinct": false, "columns": [ "user_id", "badge_id" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -1361,29 +1359,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserPoints": { + "public.UserPoints": { "name": "UserPoints", "schema": "", "columns": { @@ -1419,21 +1417,21 @@ "UserPoints_id_user_User_id_user_fk": { "name": "UserPoints_id_user_User_id_user_fk", "tableFrom": "UserPoints", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "UserPosts": { + "public.UserPosts": { "name": "UserPosts", "schema": "", "columns": { @@ -1461,28 +1459,28 @@ "UserPosts_user_id_User_id_user_fk": { "name": "UserPosts_user_id_User_id_user_fk", "tableFrom": "UserPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserPosts_post_id_Post_id_posts_fk": { "name": "UserPosts_post_id_Post_id_posts_fk", "tableFrom": "UserPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, @@ -1492,8 +1490,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "8a9a3741-e83d-4eaa-938b-d1ebaeb168ba", + "prevId": "40600999-2215-4037-8c2e-9f5c5e8019f4" } \ No newline at end of file diff --git a/src/db/migrations/meta/0025_snapshot.json b/src/db/migrations/meta/0025_snapshot.json index 6870c4d0..80e18727 100644 --- a/src/db/migrations/meta/0025_snapshot.json +++ b/src/db/migrations/meta/0025_snapshot.json @@ -1,10 +1,8 @@ { - "id": "aa2510ea-26f4-4b35-af0b-470dfa2ea798", - "prevId": "8a9a3741-e83d-4eaa-938b-d1ebaeb168ba", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -162,21 +160,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -210,21 +208,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Badges": { + "public.Badges": { "name": "Badges", "schema": "", "columns": { @@ -252,7 +250,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -280,21 +278,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Comments": { + "public.Comments": { "name": "Comments", "schema": "", "columns": { @@ -335,34 +333,34 @@ "Comments_post_id_Post_id_posts_fk": { "name": "Comments_post_id_Post_id_posts_fk", "tableFrom": "Comments", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Comments_user_id_User_id_user_fk": { "name": "Comments_user_id_User_id_user_fk", "tableFrom": "Comments", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -390,21 +388,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -445,21 +443,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureUsage": { + "public.FeatureUsage": { "name": "FeatureUsage", "schema": "", "columns": { @@ -500,21 +498,21 @@ "FeatureUsage_id_user_User_id_user_fk": { "name": "FeatureUsage_id_user_User_id_user_fk", "tableFrom": "FeatureUsage", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Followers": { + "public.Followers": { "name": "Followers", "schema": "", "columns": { @@ -542,34 +540,34 @@ "Followers_user_id_User_id_user_fk": { "name": "Followers_user_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Followers_follower_id_User_id_user_fk": { "name": "Followers_follower_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "follower_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Following": { + "public.Following": { "name": "Following", "schema": "", "columns": { @@ -597,34 +595,34 @@ "Following_user_id_User_id_user_fk": { "name": "Following_user_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Following_following_id_User_id_user_fk": { "name": "Following_following_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "following_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -671,34 +669,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -750,29 +748,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -818,21 +816,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MonthlyChallenge": { + "public.MonthlyChallenge": { "name": "MonthlyChallenge", "schema": "", "columns": { @@ -879,7 +877,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -949,29 +947,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PostLikes": { + "public.PostLikes": { "name": "PostLikes", "schema": "", "columns": { @@ -999,34 +997,34 @@ "PostLikes_post_id_Post_id_posts_fk": { "name": "PostLikes_post_id_Post_id_posts_fk", "tableFrom": "PostLikes", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "PostLikes_user_id_User_id_user_fk": { "name": "PostLikes_user_id_User_id_user_fk", "tableFrom": "PostLikes", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Post": { + "public.Post": { "name": "Post", "schema": "", "columns": { @@ -1073,21 +1071,21 @@ "Post_creator_id_User_id_user_fk": { "name": "Post_creator_id_User_id_user_fk", "tableFrom": "Post", - "tableTo": "User", "columnsFrom": [ "creator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -1147,7 +1145,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -1194,21 +1192,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -1280,21 +1278,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserBadges": { + "public.UserBadges": { "name": "UserBadges", "schema": "", "columns": { @@ -1322,43 +1320,43 @@ "UserBadges_user_id_User_id_user_fk": { "name": "UserBadges_user_id_User_id_user_fk", "tableFrom": "UserBadges", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserBadges_badge_id_Badges_id_badge_fk": { "name": "UserBadges_badge_id_Badges_id_badge_fk", "tableFrom": "UserBadges", - "tableTo": "Badges", "columnsFrom": [ "badge_id" ], + "tableTo": "Badges", "columnsTo": [ "id_badge" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "unique_user_badge": { "name": "unique_user_badge", - "nullsNotDistinct": false, "columns": [ "user_id", "badge_id" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -1416,29 +1414,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserPoints": { + "public.UserPoints": { "name": "UserPoints", "schema": "", "columns": { @@ -1474,21 +1472,21 @@ "UserPoints_id_user_User_id_user_fk": { "name": "UserPoints_id_user_User_id_user_fk", "tableFrom": "UserPoints", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "UserPosts": { + "public.UserPosts": { "name": "UserPosts", "schema": "", "columns": { @@ -1516,28 +1514,28 @@ "UserPosts_user_id_User_id_user_fk": { "name": "UserPosts_user_id_User_id_user_fk", "tableFrom": "UserPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserPosts_post_id_Post_id_posts_fk": { "name": "UserPosts_post_id_Post_id_posts_fk", "tableFrom": "UserPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, @@ -1547,8 +1545,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "aa2510ea-26f4-4b35-af0b-470dfa2ea798", + "prevId": "8a9a3741-e83d-4eaa-938b-d1ebaeb168ba" } \ No newline at end of file diff --git a/src/db/migrations/meta/0026_snapshot.json b/src/db/migrations/meta/0026_snapshot.json index 207dbaec..9f6f3969 100644 --- a/src/db/migrations/meta/0026_snapshot.json +++ b/src/db/migrations/meta/0026_snapshot.json @@ -1,10 +1,8 @@ { - "id": "27da8afa-b7e2-4bda-9564-e8ef2c3b118c", - "prevId": "aa2510ea-26f4-4b35-af0b-470dfa2ea798", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "Article": { + "public.Article": { "name": "Article", "schema": "", "columns": { @@ -38,7 +36,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Goals": { + "public.Goals": { "name": "Goals", "schema": "", "columns": { @@ -90,21 +88,21 @@ "Goals_id_user_User_id_user_fk": { "name": "Goals_id_user_User_id_user_fk", "tableFrom": "Goals", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Reminders": { + "public.Reminders": { "name": "Reminders", "schema": "", "columns": { @@ -162,21 +160,21 @@ "Reminders_id_user_User_id_user_fk": { "name": "Reminders_id_user_User_id_user_fk", "tableFrom": "Reminders", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Allergies": { + "public.Allergies": { "name": "Allergies", "schema": "", "columns": { @@ -210,21 +208,21 @@ "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Allergies", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Badges": { + "public.Badges": { "name": "Badges", "schema": "", "columns": { @@ -258,21 +256,21 @@ "Badges_id_challenge_MonthlyChallenge_id_challenge_fk": { "name": "Badges_id_challenge_MonthlyChallenge_id_challenge_fk", "tableFrom": "Badges", - "tableTo": "MonthlyChallenge", "columnsFrom": [ "id_challenge" ], + "tableTo": "MonthlyChallenge", "columnsTo": [ "id_challenge" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChallengeEvaluations": { + "public.ChallengeEvaluations": { "name": "ChallengeEvaluations", "schema": "", "columns": { @@ -320,57 +318,57 @@ "ChallengeEvaluations_id_user_User_id_user_fk": { "name": "ChallengeEvaluations_id_user_User_id_user_fk", "tableFrom": "ChallengeEvaluations", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "ChallengeEvaluations_id_challenge_MonthlyChallenge_id_challenge_fk": { "name": "ChallengeEvaluations_id_challenge_MonthlyChallenge_id_challenge_fk", "tableFrom": "ChallengeEvaluations", - "tableTo": "MonthlyChallenge", "columnsFrom": [ "id_challenge" ], + "tableTo": "MonthlyChallenge", "columnsTo": [ "id_challenge" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "ChallengeEvaluations_evaluator_id_User_id_user_fk": { "name": "ChallengeEvaluations_evaluator_id_User_id_user_fk", "tableFrom": "ChallengeEvaluations", - "tableTo": "User", "columnsFrom": [ "evaluator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "unique_evaluation": { "name": "unique_evaluation", - "nullsNotDistinct": false, "columns": [ "id_user", "id_challenge", "evaluator_id" - ] + ], + "nullsNotDistinct": false } } }, - "ChallengeSubmissions": { + "public.ChallengeSubmissions": { "name": "ChallengeSubmissions", "schema": "", "columns": { @@ -424,34 +422,34 @@ "ChallengeSubmissions_id_user_User_id_user_fk": { "name": "ChallengeSubmissions_id_user_User_id_user_fk", "tableFrom": "ChallengeSubmissions", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "ChallengeSubmissions_id_challenge_MonthlyChallenge_id_challenge_fk": { "name": "ChallengeSubmissions_id_challenge_MonthlyChallenge_id_challenge_fk", "tableFrom": "ChallengeSubmissions", - "tableTo": "MonthlyChallenge", "columnsFrom": [ "id_challenge" ], + "tableTo": "MonthlyChallenge", "columnsTo": [ "id_challenge" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "ChronicalDesease": { + "public.ChronicalDesease": { "name": "ChronicalDesease", "schema": "", "columns": { @@ -479,21 +477,21 @@ "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "ChronicalDesease", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Comments": { + "public.Comments": { "name": "Comments", "schema": "", "columns": { @@ -534,34 +532,34 @@ "Comments_post_id_Post_id_posts_fk": { "name": "Comments_post_id_Post_id_posts_fk", "tableFrom": "Comments", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" }, "Comments_user_id_User_id_user_fk": { "name": "Comments_user_id_User_id_user_fk", "tableFrom": "Comments", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "no action", - "onUpdate": "no action" + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Disability": { + "public.Disability": { "name": "Disability", "schema": "", "columns": { @@ -589,21 +587,21 @@ "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Disability", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureEvaluation": { + "public.FeatureEvaluation": { "name": "FeatureEvaluation", "schema": "", "columns": { @@ -644,21 +642,21 @@ "FeatureEvaluation_id_user_User_id_user_fk": { "name": "FeatureEvaluation_id_user_User_id_user_fk", "tableFrom": "FeatureEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "FeatureUsage": { + "public.FeatureUsage": { "name": "FeatureUsage", "schema": "", "columns": { @@ -699,21 +697,21 @@ "FeatureUsage_id_user_User_id_user_fk": { "name": "FeatureUsage_id_user_User_id_user_fk", "tableFrom": "FeatureUsage", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Followers": { + "public.Followers": { "name": "Followers", "schema": "", "columns": { @@ -741,34 +739,34 @@ "Followers_user_id_User_id_user_fk": { "name": "Followers_user_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Followers_follower_id_User_id_user_fk": { "name": "Followers_follower_id_User_id_user_fk", "tableFrom": "Followers", - "tableTo": "User", "columnsFrom": [ "follower_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Following": { + "public.Following": { "name": "Following", "schema": "", "columns": { @@ -796,34 +794,34 @@ "Following_user_id_User_id_user_fk": { "name": "Following_user_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "Following_following_id_User_id_user_fk": { "name": "Following_following_id_User_id_user_fk", "tableFrom": "Following", - "tableTo": "User", "columnsFrom": [ "following_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "GoalEvaluation": { + "public.GoalEvaluation": { "name": "GoalEvaluation", "schema": "", "columns": { @@ -870,34 +868,34 @@ "GoalEvaluation_id_user_User_id_user_fk": { "name": "GoalEvaluation_id_user_User_id_user_fk", "tableFrom": "GoalEvaluation", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "GoalEvaluation_id_goal_Goals_id_goal_fk": { "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", "tableFrom": "GoalEvaluation", - "tableTo": "Goals", "columnsFrom": [ "id_goal" ], + "tableTo": "Goals", "columnsTo": [ "id_goal" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MedicalProfile": { + "public.MedicalProfile": { "name": "MedicalProfile", "schema": "", "columns": { @@ -949,29 +947,29 @@ "MedicalProfile_id_user_User_id_user_fk": { "name": "MedicalProfile_id_user_User_id_user_fk", "tableFrom": "MedicalProfile", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "MedicalProfile_id_user_unique": { "name": "MedicalProfile_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "Medicines": { + "public.Medicines": { "name": "Medicines", "schema": "", "columns": { @@ -1017,21 +1015,21 @@ "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", "tableFrom": "Medicines", - "tableTo": "MedicalProfile", "columnsFrom": [ "id_medical_profile" ], + "tableTo": "MedicalProfile", "columnsTo": [ "id_medical_profile" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "MonthlyChallenge": { + "public.MonthlyChallenge": { "name": "MonthlyChallenge", "schema": "", "columns": { @@ -1078,7 +1076,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "PortionsNutrition": { + "public.PortionsNutrition": { "name": "PortionsNutrition", "schema": "", "columns": { @@ -1148,29 +1146,29 @@ "PortionsNutrition_id_user_User_id_user_fk": { "name": "PortionsNutrition_id_user_User_id_user_fk", "tableFrom": "PortionsNutrition", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "PortionsNutrition_id_user_unique": { "name": "PortionsNutrition_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "PostLikes": { + "public.PostLikes": { "name": "PostLikes", "schema": "", "columns": { @@ -1198,34 +1196,34 @@ "PostLikes_post_id_Post_id_posts_fk": { "name": "PostLikes_post_id_Post_id_posts_fk", "tableFrom": "PostLikes", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "PostLikes_user_id_User_id_user_fk": { "name": "PostLikes_user_id_User_id_user_fk", "tableFrom": "PostLikes", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Post": { + "public.Post": { "name": "Post", "schema": "", "columns": { @@ -1272,21 +1270,21 @@ "Post_creator_id_User_id_user_fk": { "name": "Post_creator_id_User_id_user_fk", "tableFrom": "Post", - "tableTo": "User", "columnsFrom": [ "creator_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "_prisma_migrations": { + "public._prisma_migrations": { "name": "_prisma_migrations", "schema": "", "columns": { @@ -1346,7 +1344,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "Records": { + "public.Records": { "name": "Records", "schema": "", "columns": { @@ -1393,21 +1391,21 @@ "Records_id_user_User_id_user_fk": { "name": "Records_id_user_User_id_user_fk", "tableFrom": "Records", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "User": { + "public.User": { "name": "User", "schema": "", "columns": { @@ -1479,21 +1477,21 @@ "uniqueConstraints": { "User_email_unique": { "name": "User_email_unique", - "nullsNotDistinct": false, "columns": [ "email" - ] + ], + "nullsNotDistinct": false }, "User_phone_number_unique": { "name": "User_phone_number_unique", - "nullsNotDistinct": false, "columns": [ "phone_number" - ] + ], + "nullsNotDistinct": false } } }, - "UserBadges": { + "public.UserBadges": { "name": "UserBadges", "schema": "", "columns": { @@ -1521,43 +1519,43 @@ "UserBadges_user_id_User_id_user_fk": { "name": "UserBadges_user_id_User_id_user_fk", "tableFrom": "UserBadges", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserBadges_badge_id_Badges_id_badge_fk": { "name": "UserBadges_badge_id_Badges_id_badge_fk", "tableFrom": "UserBadges", - "tableTo": "Badges", "columnsFrom": [ "badge_id" ], + "tableTo": "Badges", "columnsTo": [ "id_badge" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "unique_user_badge": { "name": "unique_user_badge", - "nullsNotDistinct": false, "columns": [ "user_id", "badge_id" - ] + ], + "nullsNotDistinct": false } } }, - "UserDetail": { + "public.UserDetail": { "name": "UserDetail", "schema": "", "columns": { @@ -1615,29 +1613,29 @@ "UserDetail_id_user_User_id_user_fk": { "name": "UserDetail_id_user_User_id_user_fk", "tableFrom": "UserDetail", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "UserDetail_id_user_unique": { "name": "UserDetail_id_user_unique", - "nullsNotDistinct": false, "columns": [ "id_user" - ] + ], + "nullsNotDistinct": false } } }, - "UserPoints": { + "public.UserPoints": { "name": "UserPoints", "schema": "", "columns": { @@ -1673,21 +1671,21 @@ "UserPoints_id_user_User_id_user_fk": { "name": "UserPoints_id_user_User_id_user_fk", "tableFrom": "UserPoints", - "tableTo": "User", "columnsFrom": [ "id_user" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "UserPosts": { + "public.UserPosts": { "name": "UserPosts", "schema": "", "columns": { @@ -1715,28 +1713,28 @@ "UserPosts_user_id_User_id_user_fk": { "name": "UserPosts_user_id_User_id_user_fk", "tableFrom": "UserPosts", - "tableTo": "User", "columnsFrom": [ "user_id" ], + "tableTo": "User", "columnsTo": [ "id_user" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" }, "UserPosts_post_id_Post_id_posts_fk": { "name": "UserPosts_post_id_Post_id_posts_fk", "tableFrom": "UserPosts", - "tableTo": "Post", "columnsFrom": [ "post_id" ], + "tableTo": "Post", "columnsTo": [ "id_posts" ], - "onDelete": "cascade", - "onUpdate": "cascade" + "onUpdate": "cascade", + "onDelete": "cascade" } }, "compositePrimaryKeys": {}, @@ -1746,8 +1744,10 @@ "enums": {}, "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} - } + "tables": {}, + "columns": {} + }, + "id": "27da8afa-b7e2-4bda-9564-e8ef2c3b118c", + "prevId": "aa2510ea-26f4-4b35-af0b-470dfa2ea798" } \ No newline at end of file diff --git a/src/db/migrations/meta/0027_snapshot.json b/src/db/migrations/meta/0027_snapshot.json new file mode 100644 index 00000000..b976db9a --- /dev/null +++ b/src/db/migrations/meta/0027_snapshot.json @@ -0,0 +1,1753 @@ +{ + "id": "c305d4b6-6757-43a8-b504-555b1b209a73", + "prevId": "27da8afa-b7e2-4bda-9564-e8ef2c3b118c", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.Article": { + "name": "Article", + "schema": "", + "columns": { + "id_article": { + "name": "id_article", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Goals": { + "name": "Goals", + "schema": "", + "columns": { + "id_goal": { + "name": "id_goal", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "varchar(15)", + "primaryKey": false, + "notNull": true + }, + "variable": { + "name": "variable", + "type": "varchar(30)", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "current_value": { + "name": "current_value", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "desired_value": { + "name": "desired_value", + "type": "double precision", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Goals_id_user_User_id_user_fk": { + "name": "Goals_id_user_User_id_user_fk", + "tableFrom": "Goals", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Reminders": { + "name": "Reminders", + "schema": "", + "columns": { + "id_reminders": { + "name": "id_reminders", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(100)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "frequency": { + "name": "frequency", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "start_time": { + "name": "start_time", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "due_time": { + "name": "due_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "end_time": { + "name": "end_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Reminders_id_user_User_id_user_fk": { + "name": "Reminders_id_user_User_id_user_fk", + "tableFrom": "Reminders", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Allergies": { + "name": "Allergies", + "schema": "", + "columns": { + "id_allergies": { + "name": "id_allergies", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_medical_profile": { + "name": "id_medical_profile", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false + }, + "reaction": { + "name": "reaction", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk": { + "name": "Allergies_id_medical_profile_MedicalProfile_id_medical_profile_fk", + "tableFrom": "Allergies", + "tableTo": "MedicalProfile", + "columnsFrom": [ + "id_medical_profile" + ], + "columnsTo": [ + "id_medical_profile" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Badges": { + "name": "Badges", + "schema": "", + "columns": { + "id_badge": { + "name": "id_badge", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_challenge": { + "name": "id_challenge", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "Badges_id_challenge_MonthlyChallenge_id_challenge_fk": { + "name": "Badges_id_challenge_MonthlyChallenge_id_challenge_fk", + "tableFrom": "Badges", + "tableTo": "MonthlyChallenge", + "columnsFrom": [ + "id_challenge" + ], + "columnsTo": [ + "id_challenge" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.ChallengeEvaluations": { + "name": "ChallengeEvaluations", + "schema": "", + "columns": { + "id_evaluation": { + "name": "id_evaluation", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id_challenge": { + "name": "id_challenge", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "evaluator_id": { + "name": "evaluator_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "score": { + "name": "score", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "evaluated_at": { + "name": "evaluated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ChallengeEvaluations_id_user_User_id_user_fk": { + "name": "ChallengeEvaluations_id_user_User_id_user_fk", + "tableFrom": "ChallengeEvaluations", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ChallengeEvaluations_id_challenge_MonthlyChallenge_id_challenge_fk": { + "name": "ChallengeEvaluations_id_challenge_MonthlyChallenge_id_challenge_fk", + "tableFrom": "ChallengeEvaluations", + "tableTo": "MonthlyChallenge", + "columnsFrom": [ + "id_challenge" + ], + "columnsTo": [ + "id_challenge" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ChallengeEvaluations_evaluator_id_User_id_user_fk": { + "name": "ChallengeEvaluations_evaluator_id_User_id_user_fk", + "tableFrom": "ChallengeEvaluations", + "tableTo": "User", + "columnsFrom": [ + "evaluator_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_evaluation": { + "name": "unique_evaluation", + "nullsNotDistinct": false, + "columns": [ + "id_user", + "id_challenge", + "evaluator_id" + ] + } + } + }, + "public.ChallengeSubmissions": { + "name": "ChallengeSubmissions", + "schema": "", + "columns": { + "id_submission": { + "name": "id_submission", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id_challenge": { + "name": "id_challenge", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "passed": { + "name": "passed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "submitted_at": { + "name": "submitted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ChallengeSubmissions_id_user_User_id_user_fk": { + "name": "ChallengeSubmissions_id_user_User_id_user_fk", + "tableFrom": "ChallengeSubmissions", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ChallengeSubmissions_id_challenge_MonthlyChallenge_id_challenge_fk": { + "name": "ChallengeSubmissions_id_challenge_MonthlyChallenge_id_challenge_fk", + "tableFrom": "ChallengeSubmissions", + "tableTo": "MonthlyChallenge", + "columnsFrom": [ + "id_challenge" + ], + "columnsTo": [ + "id_challenge" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.ChronicalDesease": { + "name": "ChronicalDesease", + "schema": "", + "columns": { + "id_chronical_desease": { + "name": "id_chronical_desease", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_medical_profile": { + "name": "id_medical_profile", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk": { + "name": "ChronicalDesease_id_medical_profile_MedicalProfile_id_medical_profile_fk", + "tableFrom": "ChronicalDesease", + "tableTo": "MedicalProfile", + "columnsFrom": [ + "id_medical_profile" + ], + "columnsTo": [ + "id_medical_profile" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Comments": { + "name": "Comments", + "schema": "", + "columns": { + "id_comment": { + "name": "id_comment", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "post_id": { + "name": "post_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Comments_post_id_Post_id_posts_fk": { + "name": "Comments_post_id_Post_id_posts_fk", + "tableFrom": "Comments", + "tableTo": "Post", + "columnsFrom": [ + "post_id" + ], + "columnsTo": [ + "id_posts" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "Comments_user_id_User_id_user_fk": { + "name": "Comments_user_id_User_id_user_fk", + "tableFrom": "Comments", + "tableTo": "User", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Disability": { + "name": "Disability", + "schema": "", + "columns": { + "id_disability": { + "name": "id_disability", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_medical_profile": { + "name": "id_medical_profile", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk": { + "name": "Disability_id_medical_profile_MedicalProfile_id_medical_profile_fk", + "tableFrom": "Disability", + "tableTo": "MedicalProfile", + "columnsFrom": [ + "id_medical_profile" + ], + "columnsTo": [ + "id_medical_profile" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.FeatureEvaluation": { + "name": "FeatureEvaluation", + "schema": "", + "columns": { + "id_feature_evaluation": { + "name": "id_feature_evaluation", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "grade": { + "name": "grade", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "FeatureEvaluation_id_user_User_id_user_fk": { + "name": "FeatureEvaluation_id_user_User_id_user_fk", + "tableFrom": "FeatureEvaluation", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.FeatureUsage": { + "name": "FeatureUsage", + "schema": "", + "columns": { + "id_feature_usage": { + "name": "id_feature_usage", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "detail": { + "name": "detail", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "date": { + "name": "date", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "FeatureUsage_id_user_User_id_user_fk": { + "name": "FeatureUsage_id_user_User_id_user_fk", + "tableFrom": "FeatureUsage", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Followers": { + "name": "Followers", + "schema": "", + "columns": { + "id_followers": { + "name": "id_followers", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "follower_id": { + "name": "follower_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Followers_user_id_User_id_user_fk": { + "name": "Followers_user_id_User_id_user_fk", + "tableFrom": "Followers", + "tableTo": "User", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Followers_follower_id_User_id_user_fk": { + "name": "Followers_follower_id_User_id_user_fk", + "tableFrom": "Followers", + "tableTo": "User", + "columnsFrom": [ + "follower_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Following": { + "name": "Following", + "schema": "", + "columns": { + "id_following": { + "name": "id_following", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "following_id": { + "name": "following_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Following_user_id_User_id_user_fk": { + "name": "Following_user_id_User_id_user_fk", + "tableFrom": "Following", + "tableTo": "User", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Following_following_id_User_id_user_fk": { + "name": "Following_following_id_User_id_user_fk", + "tableFrom": "Following", + "tableTo": "User", + "columnsFrom": [ + "following_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.GoalEvaluation": { + "name": "GoalEvaluation", + "schema": "", + "columns": { + "id_goal_evaluation": { + "name": "id_goal_evaluation", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id_goal": { + "name": "id_goal", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "grade": { + "name": "grade", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "GoalEvaluation_id_user_User_id_user_fk": { + "name": "GoalEvaluation_id_user_User_id_user_fk", + "tableFrom": "GoalEvaluation", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "GoalEvaluation_id_goal_Goals_id_goal_fk": { + "name": "GoalEvaluation_id_goal_Goals_id_goal_fk", + "tableFrom": "GoalEvaluation", + "tableTo": "Goals", + "columnsFrom": [ + "id_goal" + ], + "columnsTo": [ + "id_goal" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.MedicalProfile": { + "name": "MedicalProfile", + "schema": "", + "columns": { + "id_medical_profile": { + "name": "id_medical_profile", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "emergency_name": { + "name": "emergency_name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": false + }, + "emergency_phone": { + "name": "emergency_phone", + "type": "varchar(12)", + "primaryKey": false, + "notNull": false + }, + "policyUser": { + "name": "policyUser", + "type": "varchar(30)", + "primaryKey": false, + "notNull": false + }, + "insurance_company": { + "name": "insurance_company", + "type": "varchar(50)", + "primaryKey": false, + "notNull": false + }, + "bloodType": { + "name": "bloodType", + "type": "varchar(30)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "MedicalProfile_id_user_User_id_user_fk": { + "name": "MedicalProfile_id_user_User_id_user_fk", + "tableFrom": "MedicalProfile", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "MedicalProfile_id_user_unique": { + "name": "MedicalProfile_id_user_unique", + "nullsNotDistinct": false, + "columns": [ + "id_user" + ] + } + } + }, + "public.Medicines": { + "name": "Medicines", + "schema": "", + "columns": { + "id_medicines": { + "name": "id_medicines", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_medical_profile": { + "name": "id_medical_profile", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false + }, + "route_admin": { + "name": "route_admin", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false + }, + "dose": { + "name": "dose", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk": { + "name": "Medicines_id_medical_profile_MedicalProfile_id_medical_profile_fk", + "tableFrom": "Medicines", + "tableTo": "MedicalProfile", + "columnsFrom": [ + "id_medical_profile" + ], + "columnsTo": [ + "id_medical_profile" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.MonthlyChallenge": { + "name": "MonthlyChallenge", + "schema": "", + "columns": { + "id_challenge": { + "name": "id_challenge", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(100)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "start_date": { + "name": "start_date", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "end_date": { + "name": "end_date", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.PortionsNutrition": { + "name": "PortionsNutrition", + "schema": "", + "columns": { + "id_nutriton_portion": { + "name": "id_nutriton_portion", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fruits": { + "name": "fruits", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "vegetables": { + "name": "vegetables", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "milk": { + "name": "milk", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "legumes": { + "name": "legumes", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "cereals": { + "name": "cereals", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "meat": { + "name": "meat", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "sugar": { + "name": "sugar", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fat": { + "name": "fat", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "PortionsNutrition_id_user_User_id_user_fk": { + "name": "PortionsNutrition_id_user_User_id_user_fk", + "tableFrom": "PortionsNutrition", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "PortionsNutrition_id_user_unique": { + "name": "PortionsNutrition_id_user_unique", + "nullsNotDistinct": false, + "columns": [ + "id_user" + ] + } + } + }, + "public.PostLikes": { + "name": "PostLikes", + "schema": "", + "columns": { + "id_like": { + "name": "id_like", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "post_id": { + "name": "post_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "PostLikes_post_id_Post_id_posts_fk": { + "name": "PostLikes_post_id_Post_id_posts_fk", + "tableFrom": "PostLikes", + "tableTo": "Post", + "columnsFrom": [ + "post_id" + ], + "columnsTo": [ + "id_posts" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "PostLikes_user_id_User_id_user_fk": { + "name": "PostLikes_user_id_User_id_user_fk", + "tableFrom": "PostLikes", + "tableTo": "User", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Post": { + "name": "Post", + "schema": "", + "columns": { + "id_posts": { + "name": "id_posts", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "creator_id": { + "name": "creator_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "post_photo": { + "name": "post_photo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag": { + "name": "tag", + "type": "varchar(50)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Post_creator_id_User_id_user_fk": { + "name": "Post_creator_id_User_id_user_fk", + "tableFrom": "Post", + "tableTo": "User", + "columnsFrom": [ + "creator_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public._prisma_migrations": { + "name": "_prisma_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(36)", + "primaryKey": true, + "notNull": true + }, + "checksum": { + "name": "checksum", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "finished_at": { + "name": "finished_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "migration_name": { + "name": "migration_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "logs": { + "name": "logs", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rolled_back_at": { + "name": "rolled_back_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "applied_steps_count": { + "name": "applied_steps_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.Records": { + "name": "Records", + "schema": "", + "columns": { + "id_record": { + "name": "id_record", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "varchar(15)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "date": { + "name": "date", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Records_id_user_User_id_user_fk": { + "name": "Records_id_user_User_id_user_fk", + "tableFrom": "Records", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.User": { + "name": "User", + "schema": "", + "columns": { + "id_user": { + "name": "id_user", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(100)", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "phone_number": { + "name": "phone_number", + "type": "varchar(12)", + "primaryKey": false, + "notNull": false + }, + "profile_photo": { + "name": "profile_photo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "membership": { + "name": "membership", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "membership_time": { + "name": "membership_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "User_email_unique": { + "name": "User_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + }, + "User_phone_number_unique": { + "name": "User_phone_number_unique", + "nullsNotDistinct": false, + "columns": [ + "phone_number" + ] + } + } + }, + "public.UserBadges": { + "name": "UserBadges", + "schema": "", + "columns": { + "id_user_badges": { + "name": "id_user_badges", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "badge_id": { + "name": "badge_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "UserBadges_user_id_User_id_user_fk": { + "name": "UserBadges_user_id_User_id_user_fk", + "tableFrom": "UserBadges", + "tableTo": "User", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "UserBadges_badge_id_Badges_id_badge_fk": { + "name": "UserBadges_badge_id_Badges_id_badge_fk", + "tableFrom": "UserBadges", + "tableTo": "Badges", + "columnsFrom": [ + "badge_id" + ], + "columnsTo": [ + "id_badge" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_user_badge": { + "name": "unique_user_badge", + "nullsNotDistinct": false, + "columns": [ + "user_id", + "badge_id" + ] + } + } + }, + "public.UserDetail": { + "name": "UserDetail", + "schema": "", + "columns": { + "id_user_detail": { + "name": "id_user_detail", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "sex": { + "name": "sex", + "type": "varchar(1)", + "primaryKey": false, + "notNull": true + }, + "weight": { + "name": "weight", + "type": "double precision", + "primaryKey": false, + "notNull": true + }, + "height": { + "name": "height", + "type": "double precision", + "primaryKey": false, + "notNull": true + }, + "body_fat": { + "name": "body_fat", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "birth_date": { + "name": "birth_date", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "muscular_mass": { + "name": "muscular_mass", + "type": "double precision", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "UserDetail_id_user_User_id_user_fk": { + "name": "UserDetail_id_user_User_id_user_fk", + "tableFrom": "UserDetail", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "UserDetail_id_user_unique": { + "name": "UserDetail_id_user_unique", + "nullsNotDistinct": false, + "columns": [ + "id_user" + ] + } + } + }, + "public.UserPoints": { + "name": "UserPoints", + "schema": "", + "columns": { + "id_user_point": { + "name": "id_user_point", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "id_user": { + "name": "id_user", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "points": { + "name": "points", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "UserPoints_id_user_User_id_user_fk": { + "name": "UserPoints_id_user_User_id_user_fk", + "tableFrom": "UserPoints", + "tableTo": "User", + "columnsFrom": [ + "id_user" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.UserPosts": { + "name": "UserPosts", + "schema": "", + "columns": { + "id_user_posts": { + "name": "id_user_posts", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "post_id": { + "name": "post_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "UserPosts_user_id_User_id_user_fk": { + "name": "UserPosts_user_id_User_id_user_fk", + "tableFrom": "UserPosts", + "tableTo": "User", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id_user" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "UserPosts_post_id_Post_id_posts_fk": { + "name": "UserPosts_post_id_Post_id_posts_fk", + "tableFrom": "UserPosts", + "tableTo": "Post", + "columnsFrom": [ + "post_id" + ], + "columnsTo": [ + "id_posts" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/src/db/migrations/meta/_journal.json b/src/db/migrations/meta/_journal.json index e0aae8bc..ce0cb8c6 100644 --- a/src/db/migrations/meta/_journal.json +++ b/src/db/migrations/meta/_journal.json @@ -190,6 +190,13 @@ "when": 1717116985172, "tag": "0026_evaluations", "breakpoints": true + }, + { + "idx": 27, + "version": "7", + "when": 1717690148820, + "tag": "0027_fat_muscular_nullable", + "breakpoints": true } ] } \ No newline at end of file diff --git a/sst.config.ts b/sst.config.ts index 9b092ae0..33c96300 100644 --- a/sst.config.ts +++ b/sst.config.ts @@ -33,13 +33,19 @@ export default $config({ }) const blogCron = new sst.aws.Cron('MyCronJob', { - job: 'src/cron_functions/blog.handler', schedule: 'cron(0 6 * * ? *)', + job: { + handler: 'src/cron_functions/blog.handler', + timeout: '60 seconds' + } }) const remindersCron = new sst.aws.Cron('RemindersJob', { - job: 'src/cron_functions/reminders.handler', schedule: 'rate(30 minutes)', + job: { + handler: 'src/cron_functions/reminders.handler', + timeout: '60 seconds' + } }) new sst.aws.Nextjs('MyWeb', {