Skip to content

Commit

Permalink
chore:migrated cockroachDB -> yugabyteDB
Browse files Browse the repository at this point in the history
  • Loading branch information
SySagar committed Nov 14, 2023
1 parent 98e32ec commit 0e6be2d
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 63 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"nodemon": "^2.0.21",
"prisma": "^5.5.2"
"prisma": "^5.6.0"
},
"scripts": {
"dev": "nodemon src/app",
Expand Down
12 changes: 0 additions & 12 deletions prisma/migrations/20231113164424_/migration.sql

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ CREATE TYPE "Gender" AS ENUM ('Male', 'Female', 'PreferNotToSay');

-- CreateTable
CREATE TABLE "User" (
"id" STRING NOT NULL,
"email" STRING NOT NULL,
"password" STRING NOT NULL,
"id" TEXT NOT NULL,
"email" TEXT NOT NULL,
"password" TEXT NOT NULL,
"role" "Role" NOT NULL DEFAULT 'Member',
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

Expand All @@ -17,27 +17,27 @@ CREATE TABLE "User" (

-- CreateTable
CREATE TABLE "Profile" (
"id" STRING NOT NULL,
"name" STRING NOT NULL,
"username" STRING NOT NULL,
"graduation_year" INT4 NOT NULL,
"avatar" STRING,
"twitter_username" STRING,
"linkedin_url" STRING,
"userId" STRING NOT NULL,
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"username" TEXT NOT NULL,
"graduation_year" INTEGER NOT NULL,
"avatar" TEXT,
"twitter_username" TEXT,
"linkedin_url" TEXT,
"userId" TEXT NOT NULL,

CONSTRAINT "Profile_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Event" (
"id" STRING NOT NULL,
"name" STRING NOT NULL,
"slug" STRING NOT NULL,
"poster" STRING NOT NULL,
"subtitle" STRING,
"description" STRING NOT NULL,
"is_single_day" BOOL NOT NULL,
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"slug" TEXT NOT NULL,
"poster" TEXT NOT NULL,
"subtitle" TEXT,
"description" TEXT NOT NULL,
"is_single_day" BOOLEAN NOT NULL,
"start_date" TIMESTAMP(3) NOT NULL,
"end_date" TIMESTAMP(3),
"registration_start_date" TIMESTAMP(3) NOT NULL,
Expand All @@ -48,39 +48,52 @@ CREATE TABLE "Event" (

-- CreateTable
CREATE TABLE "EventRegistration" (
"id" STRING NOT NULL,
"name" STRING NOT NULL,
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"gender" "Gender" NOT NULL DEFAULT 'PreferNotToSay',
"email" STRING NOT NULL,
"whatsapp_no" STRING NOT NULL,
"registration_no" STRING NOT NULL,
"branch" STRING NOT NULL,
"graduation_year" INT4 NOT NULL,
"expectations" STRING,
"eventId" STRING NOT NULL,
"email" TEXT NOT NULL,
"whatsapp_no" TEXT NOT NULL,
"registration_no" TEXT NOT NULL,
"branch" TEXT NOT NULL,
"graduation_year" INTEGER NOT NULL,
"expectations" TEXT,
"eventId" TEXT NOT NULL,

CONSTRAINT "EventRegistration_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Induction" (
"id" STRING NOT NULL,
"name" STRING NOT NULL,
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"gender" "Gender" NOT NULL DEFAULT 'PreferNotToSay',
"email" STRING NOT NULL,
"whatsapp_no" STRING NOT NULL,
"github_profile_url" STRING NOT NULL,
"hackerearth_profile_url" STRING NOT NULL,
"registration_no" STRING NOT NULL,
"branch" STRING NOT NULL,
"graduation_year" INT4 NOT NULL,
"why" STRING NOT NULL,
"preferred_primary_domain" STRING NOT NULL,
"preferred_secondary_domain" STRING NOT NULL,
"email" TEXT NOT NULL,
"whatsapp_no" TEXT NOT NULL,
"github_profile_url" TEXT NOT NULL,
"hackerearth_profile_url" TEXT NOT NULL,
"registration_no" TEXT NOT NULL,
"branch" TEXT NOT NULL,
"graduation_year" INTEGER NOT NULL,
"why" TEXT NOT NULL,
"preferred_primary_domain" TEXT NOT NULL,
"preferred_secondary_domain" TEXT NOT NULL,

CONSTRAINT "Induction_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Blog" (
"id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"tags" TEXT[],
"content" TEXT NOT NULL,
"date" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "Blog_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");

Expand Down
2 changes: 1 addition & 1 deletion prisma/migrations/migration_lock.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "cockroachdb"
provider = "postgresql"
2 changes: 1 addition & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ generator client {
}

datasource db {
provider = "cockroachdb"
provider = "postgresql"
url = env("DATABASE_URL")
}

Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,10 @@
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81.tgz#d3b5dcf95b6d220e258cbf6ae19b06d30a7e9f14"
integrity sha512-q617EUWfRIDTriWADZ4YiWRZXCa/WuhNgLTVd+HqWLffjMSPzyM5uOWoauX91wvQClSKZU4pzI4JJLQ9Kl62Qg==

"@prisma/engines@5.5.2":
version "5.5.2"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.5.2.tgz#fe0d2361a48c7d59568ccf0d35c75432594e1ac1"
integrity sha512-Be5hoNF8k+lkB3uEMiCHbhbfF6aj1GnrTBnn5iYFT7GEr3TsOEp1soviEcBR0tYCgHbxjcIxJMhdbvxALJhAqg==
"@prisma/engines@5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.6.0.tgz#82c445aa10633bbc0388aa2d6e411a0bd94c9439"
integrity sha512-Mt2q+GNJpU2vFn6kif24oRSBQv1KOkYaterQsi0k2/lA+dLvhRX6Lm26gon6PYHwUM8/h8KRgXIUMU0PCLB6bw==

"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
version "1.1.2"
Expand Down Expand Up @@ -1472,12 +1472,12 @@ picomatch@^2.0.4, picomatch@^2.2.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

prisma@^5.5.2:
version "5.5.2"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.5.2.tgz#54ad2f04f0dd4174f27128e4447013e8d75c4d69"
integrity sha512-WQtG6fevOL053yoPl6dbHV+IWgKo25IRN4/pwAGqcWmg7CrtoCzvbDbN9fXUc7QS2KK0LimHIqLsaCOX/vHl8w==
prisma@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.6.0.tgz#ae2c27fdfb4d53be7f7dafb50d6b8b7f55c93aa5"
integrity sha512-EEaccku4ZGshdr2cthYHhf7iyvCcXqwJDvnoQRAJg5ge2Tzpv0e2BaMCp+CbbDUwoVTzwgOap9Zp+d4jFa2O9A==
dependencies:
"@prisma/engines" "5.5.2"
"@prisma/engines" "5.6.0"

process-nextick-args@~2.0.0:
version "2.0.1"
Expand Down

0 comments on commit 0e6be2d

Please sign in to comment.