diff --git a/prisma/migrations/20230801234208_add_created_at_and_updated_at_to_users_table/migration.sql b/prisma/migrations/20230801234208_add_created_at_and_updated_at_to_users_table/migration.sql new file mode 100644 index 0000000..5f8138c --- /dev/null +++ b/prisma/migrations/20230801234208_add_created_at_and_updated_at_to_users_table/migration.sql @@ -0,0 +1,3 @@ +-- AlterTable +ALTER TABLE "User" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, +ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 80e4ee7..00aa762 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -260,6 +260,9 @@ model User { organizationUsers OrganizationUser[] organizations Organization[] worldChampEntrant WorldChampEntrant? + + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt } model VerificationToken { diff --git a/src/server/scripts/studio-prod.sh b/src/server/scripts/studio-prod.sh new file mode 100755 index 0000000..8d8eca0 --- /dev/null +++ b/src/server/scripts/studio-prod.sh @@ -0,0 +1,12 @@ +#! /bin/bash + +set -e +cd "$(dirname "$0")/../../.." + + +set -o allexport +source .env +set +o allexport + +echo "Connecting to prod db" +DATABASE_URL=$PROD_DATABASE_URL pnpm prisma studio \ No newline at end of file