@optimatech88/titomeet-shared-lib 1.0.20 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './auth/auth.guard';
2
- export { PrismaClient, User, Account, UserRole, Event, EventAccess, EventVisibility, EventStatus, EventPrice, Address, Participant, ParticipantStatus, Provider, ProviderStatus, EventCategory, Review, ProviderCategory } from '@prisma/client';
2
+ export { PrismaClient, User, Account, UserRole, Event, EventAccess, EventVisibility, EventStatus, EventPrice, Address, Participant, ParticipantStatus, Provider, ProviderStatus, EventCategory, Review, ProviderCategory, Order, OrderStatus, OrderItem, PaymentStatus, } from '@prisma/client';
3
3
  export * from './auth/auth.guard';
4
4
  export * from './auth/auth.module';
5
5
  export * from './auth/admin.middleware';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACH,YAAY,EAAE,IAAI,EAAE,OAAO,EACvB,QAAQ,EAAE,KAAK,EAAE,WAAW,EAC5B,eAAe,EAAE,WAAW,EAC5B,UAAU,EAAE,OAAO,EAAE,WAAW,EAChC,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,MAAM,EACV,gBAAgB,EACf,MAAM,gBAAgB,CAAC;AAG5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACH,YAAY,EAAE,IAAI,EAAE,OAAO,EACvB,QAAQ,EAAE,KAAK,EAAE,WAAW,EAC5B,eAAe,EAAE,WAAW,EAC5B,UAAU,EAAE,OAAO,EAAE,WAAW,EAChC,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,MAAM,EACV,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,SAAS,EACT,aAAa,GACZ,MAAM,gBAAgB,CAAC;AAG5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.JwtService = exports.ProviderStatus = exports.ParticipantStatus = exports.EventStatus = exports.EventVisibility = exports.EventAccess = exports.UserRole = exports.PrismaClient = void 0;
17
+ exports.JwtService = exports.PaymentStatus = exports.OrderStatus = exports.ProviderStatus = exports.ParticipantStatus = exports.EventStatus = exports.EventVisibility = exports.EventAccess = exports.UserRole = exports.PrismaClient = void 0;
18
18
  __exportStar(require("./auth/auth.guard"), exports);
19
19
  var client_1 = require("@prisma/client");
20
20
  Object.defineProperty(exports, "PrismaClient", { enumerable: true, get: function () { return client_1.PrismaClient; } });
@@ -24,6 +24,8 @@ Object.defineProperty(exports, "EventVisibility", { enumerable: true, get: funct
24
24
  Object.defineProperty(exports, "EventStatus", { enumerable: true, get: function () { return client_1.EventStatus; } });
25
25
  Object.defineProperty(exports, "ParticipantStatus", { enumerable: true, get: function () { return client_1.ParticipantStatus; } });
26
26
  Object.defineProperty(exports, "ProviderStatus", { enumerable: true, get: function () { return client_1.ProviderStatus; } });
27
+ Object.defineProperty(exports, "OrderStatus", { enumerable: true, get: function () { return client_1.OrderStatus; } });
28
+ Object.defineProperty(exports, "PaymentStatus", { enumerable: true, get: function () { return client_1.PaymentStatus; } });
27
29
  __exportStar(require("./auth/auth.guard"), exports);
28
30
  __exportStar(require("./auth/auth.module"), exports);
29
31
  __exportStar(require("./auth/admin.middleware"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,yCAW4B;AAVxB,sGAAA,YAAY,OAAA;AACR,kGAAA,QAAQ,OAAA;AAAS,qGAAA,WAAW,OAAA;AAC5B,yGAAA,eAAe,OAAA;AAAE,qGAAA,WAAW,OAAA;AAE5B,2GAAA,iBAAiB,OAAA;AAEjB,wGAAA,cAAc,OAAA;AAOtB,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AAGxC,uDAAqC;AACrC,wDAAsC;AAGtC,yDAAuC;AACvC,0DAAwC;AACxC,gDAA8B;AAC9B,0CAAwB;AACxB,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAE/B,mCAAyC;AAAhC,iGAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,yCAe4B;AAdxB,sGAAA,YAAY,OAAA;AACR,kGAAA,QAAQ,OAAA;AAAS,qGAAA,WAAW,OAAA;AAC5B,yGAAA,eAAe,OAAA;AAAE,qGAAA,WAAW,OAAA;AAE5B,2GAAA,iBAAiB,OAAA;AAEjB,wGAAA,cAAc,OAAA;AAKlB,qGAAA,WAAW,OAAA;AAEX,uGAAA,aAAa,OAAA;AAIjB,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AAGxC,uDAAqC;AACrC,wDAAsC;AAGtC,yDAAuC;AACvC,0DAAwC;AACxC,gDAA8B;AAC9B,0CAAwB;AACxB,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAE/B,mCAAyC;AAAhC,iGAAA,UAAU,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimatech88/titomeet-shared-lib",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -0,0 +1,79 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - The values [PENDING,CANCELLED] on the enum `EventStatus` will be removed. If these variants are still used in the database, this will fail.
5
+ - You are about to drop the column `countryCode` on the `Address` table. All the data in the column will be lost.
6
+ - You are about to drop the column `latitude` on the `Address` table. All the data in the column will be lost.
7
+ - You are about to drop the column `longitude` on the `Address` table. All the data in the column will be lost.
8
+ - You are about to drop the column `type` on the `Address` table. All the data in the column will be lost.
9
+ - You are about to drop the column `addressId` on the `Provider` table. All the data in the column will be lost.
10
+ - You are about to drop the column `categoryId` on the `Provider` table. All the data in the column will be lost.
11
+ - You are about to drop the column `rating` on the `Provider` table. All the data in the column will be lost.
12
+ - You are about to drop the `Favorite` table. If the table is not empty, all the data it contains will be lost.
13
+ - You are about to drop the `ProviderCategory` table. If the table is not empty, all the data it contains will be lost.
14
+ - You are about to drop the `Review` table. If the table is not empty, all the data it contains will be lost.
15
+ - Made the column `city` on table `Address` required. This step will fail if there are existing NULL values in that column.
16
+ - Made the column `state` on table `Address` required. This step will fail if there are existing NULL values in that column.
17
+ - Made the column `postalCode` on table `Address` required. This step will fail if there are existing NULL values in that column.
18
+
19
+ */
20
+ -- CreateEnum
21
+ CREATE TYPE "OrderStatus" AS ENUM ('PENDING', 'CONFIRMED', 'CANCELLED', 'REFUNDED');
22
+
23
+ -- CreateEnum
24
+ CREATE TYPE "PaymentStatus" AS ENUM ('PENDING', 'COMPLETED', 'FAILED', 'REFUNDED');
25
+
26
+ -- AlterEnum
27
+ BEGIN;
28
+ CREATE TYPE "EventStatus_new" AS ENUM ('DRAFT', 'PUBLISHED');
29
+ ALTER TABLE "Event" ALTER COLUMN "status" DROP DEFAULT;
30
+ ALTER TABLE "Event" ALTER COLUMN "status" TYPE "EventStatus_new" USING ("status"::text::"EventStatus_new");
31
+ ALTER TYPE "EventStatus" RENAME TO "EventStatus_old";
32
+ ALTER TYPE "EventStatus_new" RENAME TO "EventStatus";
33
+ DROP TYPE "EventStatus_old";
34
+ ALTER TABLE "Event" ALTER COLUMN "status" SET DEFAULT 'DRAFT';
35
+ COMMIT;
36
+
37
+ -- DropForeignKey
38
+ ALTER TABLE "Favorite" DROP CONSTRAINT "Favorite_eventId_fkey";
39
+
40
+ -- DropForeignKey
41
+ ALTER TABLE "Favorite" DROP CONSTRAINT "Favorite_userId_fkey";
42
+
43
+ -- DropForeignKey
44
+ ALTER TABLE "Provider" DROP CONSTRAINT "Provider_addressId_fkey";
45
+
46
+ -- DropForeignKey
47
+ ALTER TABLE "Provider" DROP CONSTRAINT "Provider_categoryId_fkey";
48
+
49
+ -- DropForeignKey
50
+ ALTER TABLE "Review" DROP CONSTRAINT "Review_providerId_fkey";
51
+
52
+ -- DropForeignKey
53
+ ALTER TABLE "Review" DROP CONSTRAINT "Review_userId_fkey";
54
+
55
+ -- DropIndex
56
+ DROP INDEX "EventCategory_name_key";
57
+
58
+ -- AlterTable
59
+ ALTER TABLE "Address" DROP COLUMN "countryCode",
60
+ DROP COLUMN "latitude",
61
+ DROP COLUMN "longitude",
62
+ DROP COLUMN "type",
63
+ ALTER COLUMN "city" SET NOT NULL,
64
+ ALTER COLUMN "state" SET NOT NULL,
65
+ ALTER COLUMN "postalCode" SET NOT NULL;
66
+
67
+ -- AlterTable
68
+ ALTER TABLE "Provider" DROP COLUMN "addressId",
69
+ DROP COLUMN "categoryId",
70
+ DROP COLUMN "rating";
71
+
72
+ -- DropTable
73
+ DROP TABLE "Favorite";
74
+
75
+ -- DropTable
76
+ DROP TABLE "ProviderCategory";
77
+
78
+ -- DropTable
79
+ DROP TABLE "Review";
@@ -0,0 +1,143 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - A unique constraint covering the columns `[name]` on the table `EventCategory` will be added. If there are existing duplicate values, this will fail.
5
+ - Added the required column `categoryId` to the `Provider` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- AlterEnum
9
+ -- This migration adds more than one value to an enum.
10
+ -- With PostgreSQL versions 11 and earlier, this is not possible
11
+ -- in a single migration. This can be worked around by creating
12
+ -- multiple migrations, each migration adding only one value to
13
+ -- the enum.
14
+
15
+
16
+ ALTER TYPE "EventStatus" ADD VALUE 'PENDING';
17
+ ALTER TYPE "EventStatus" ADD VALUE 'CANCELLED';
18
+
19
+ -- AlterTable
20
+ ALTER TABLE "Address" ADD COLUMN "countryCode" TEXT,
21
+ ADD COLUMN "latitude" DOUBLE PRECISION,
22
+ ADD COLUMN "longitude" DOUBLE PRECISION,
23
+ ADD COLUMN "type" TEXT NOT NULL DEFAULT 'suburb',
24
+ ALTER COLUMN "city" DROP NOT NULL,
25
+ ALTER COLUMN "state" DROP NOT NULL,
26
+ ALTER COLUMN "postalCode" DROP NOT NULL;
27
+
28
+ -- AlterTable
29
+ ALTER TABLE "EventCategory" ADD COLUMN "active" BOOLEAN NOT NULL DEFAULT true;
30
+
31
+ -- AlterTable
32
+ ALTER TABLE "Provider" ADD COLUMN "addressId" TEXT,
33
+ ADD COLUMN "categoryId" TEXT NOT NULL,
34
+ ADD COLUMN "docs" JSONB,
35
+ ADD COLUMN "email" TEXT,
36
+ ADD COLUMN "phoneNumber" TEXT,
37
+ ADD COLUMN "pricingDetails" TEXT,
38
+ ADD COLUMN "rating" DOUBLE PRECISION,
39
+ ADD COLUMN "website" TEXT;
40
+
41
+ -- CreateTable
42
+ CREATE TABLE "ProviderCategory" (
43
+ "id" TEXT NOT NULL,
44
+ "name" TEXT NOT NULL,
45
+ "description" TEXT,
46
+ "active" BOOLEAN NOT NULL DEFAULT true,
47
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
48
+ "updatedAt" TIMESTAMP(3) NOT NULL,
49
+
50
+ CONSTRAINT "ProviderCategory_pkey" PRIMARY KEY ("id")
51
+ );
52
+
53
+ -- CreateTable
54
+ CREATE TABLE "Review" (
55
+ "id" TEXT NOT NULL,
56
+ "rating" DOUBLE PRECISION NOT NULL,
57
+ "comment" TEXT,
58
+ "providerId" TEXT NOT NULL,
59
+ "userId" TEXT NOT NULL,
60
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
61
+ "updatedAt" TIMESTAMP(3) NOT NULL,
62
+
63
+ CONSTRAINT "Review_pkey" PRIMARY KEY ("id")
64
+ );
65
+
66
+ -- CreateTable
67
+ CREATE TABLE "Favorite" (
68
+ "id" TEXT NOT NULL,
69
+ "userId" TEXT NOT NULL,
70
+ "eventId" TEXT NOT NULL,
71
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
72
+ "updatedAt" TIMESTAMP(3) NOT NULL,
73
+
74
+ CONSTRAINT "Favorite_pkey" PRIMARY KEY ("id")
75
+ );
76
+
77
+ -- CreateTable
78
+ CREATE TABLE "Order" (
79
+ "id" TEXT NOT NULL,
80
+ "userId" TEXT NOT NULL,
81
+ "eventId" TEXT NOT NULL,
82
+ "email" TEXT NOT NULL,
83
+ "status" "OrderStatus" NOT NULL DEFAULT 'PENDING',
84
+ "totalAmount" DOUBLE PRECISION NOT NULL,
85
+ "paymentIntentId" TEXT,
86
+ "paymentStatus" "PaymentStatus" NOT NULL DEFAULT 'PENDING',
87
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
88
+ "updatedAt" TIMESTAMP(3) NOT NULL,
89
+
90
+ CONSTRAINT "Order_pkey" PRIMARY KEY ("id")
91
+ );
92
+
93
+ -- CreateTable
94
+ CREATE TABLE "OrderItem" (
95
+ "id" TEXT NOT NULL,
96
+ "orderId" TEXT NOT NULL,
97
+ "eventPriceId" TEXT NOT NULL,
98
+ "quantity" INTEGER NOT NULL,
99
+ "unitPrice" DOUBLE PRECISION NOT NULL,
100
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
101
+ "updatedAt" TIMESTAMP(3) NOT NULL,
102
+
103
+ CONSTRAINT "OrderItem_pkey" PRIMARY KEY ("id")
104
+ );
105
+
106
+ -- CreateIndex
107
+ CREATE UNIQUE INDEX "ProviderCategory_name_key" ON "ProviderCategory"("name");
108
+
109
+ -- CreateIndex
110
+ CREATE UNIQUE INDEX "Order_paymentIntentId_key" ON "Order"("paymentIntentId");
111
+
112
+ -- CreateIndex
113
+ CREATE UNIQUE INDEX "EventCategory_name_key" ON "EventCategory"("name");
114
+
115
+ -- AddForeignKey
116
+ ALTER TABLE "Provider" ADD CONSTRAINT "Provider_addressId_fkey" FOREIGN KEY ("addressId") REFERENCES "Address"("id") ON DELETE SET NULL ON UPDATE CASCADE;
117
+
118
+ -- AddForeignKey
119
+ ALTER TABLE "Provider" ADD CONSTRAINT "Provider_categoryId_fkey" FOREIGN KEY ("categoryId") REFERENCES "ProviderCategory"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
120
+
121
+ -- AddForeignKey
122
+ ALTER TABLE "Review" ADD CONSTRAINT "Review_providerId_fkey" FOREIGN KEY ("providerId") REFERENCES "Provider"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
123
+
124
+ -- AddForeignKey
125
+ ALTER TABLE "Review" ADD CONSTRAINT "Review_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
126
+
127
+ -- AddForeignKey
128
+ ALTER TABLE "Favorite" ADD CONSTRAINT "Favorite_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
129
+
130
+ -- AddForeignKey
131
+ ALTER TABLE "Favorite" ADD CONSTRAINT "Favorite_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES "Event"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
132
+
133
+ -- AddForeignKey
134
+ ALTER TABLE "Order" ADD CONSTRAINT "Order_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
135
+
136
+ -- AddForeignKey
137
+ ALTER TABLE "Order" ADD CONSTRAINT "Order_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES "Event"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
138
+
139
+ -- AddForeignKey
140
+ ALTER TABLE "OrderItem" ADD CONSTRAINT "OrderItem_orderId_fkey" FOREIGN KEY ("orderId") REFERENCES "Order"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
141
+
142
+ -- AddForeignKey
143
+ ALTER TABLE "OrderItem" ADD CONSTRAINT "OrderItem_eventPriceId_fkey" FOREIGN KEY ("eventPriceId") REFERENCES "EventPrice"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
package/src/index.ts CHANGED
@@ -9,7 +9,11 @@ export {
9
9
  ProviderStatus,
10
10
  EventCategory,
11
11
  Review,
12
- ProviderCategory
12
+ ProviderCategory,
13
+ Order,
14
+ OrderStatus,
15
+ OrderItem,
16
+ PaymentStatus,
13
17
  } from '@prisma/client';
14
18
 
15
19
  //auth
@@ -1,64 +0,0 @@
1
- /*
2
- Warnings:
3
-
4
- - Added the required column `email` to the `Provider` table without a default value. This is not possible if the table is not empty.
5
-
6
- */
7
- -- CreateEnum
8
- CREATE TYPE "OrderStatus" AS ENUM ('PENDING', 'CONFIRMED', 'CANCELLED', 'REFUNDED');
9
-
10
- -- CreateEnum
11
- CREATE TYPE "PaymentStatus" AS ENUM ('PENDING', 'COMPLETED', 'FAILED', 'REFUNDED');
12
-
13
- -- AlterTable
14
- ALTER TABLE "EventCategory" ADD COLUMN "active" BOOLEAN NOT NULL DEFAULT true;
15
-
16
- -- AlterTable
17
- ALTER TABLE "Provider" ADD COLUMN "docs" JSONB,
18
- ADD COLUMN "email" TEXT NOT NULL,
19
- ADD COLUMN "phoneNumber" TEXT,
20
- ADD COLUMN "pricingDetails" TEXT,
21
- ADD COLUMN "website" TEXT;
22
-
23
- -- AlterTable
24
- ALTER TABLE "ProviderCategory" ADD COLUMN "active" BOOLEAN NOT NULL DEFAULT true;
25
-
26
- -- CreateTable
27
- CREATE TABLE "Order" (
28
- "id" TEXT NOT NULL,
29
- "userId" TEXT NOT NULL,
30
- "email" TEXT NOT NULL,
31
- "status" "OrderStatus" NOT NULL DEFAULT 'PENDING',
32
- "totalAmount" DOUBLE PRECISION NOT NULL,
33
- "paymentIntentId" TEXT,
34
- "paymentStatus" "PaymentStatus" NOT NULL DEFAULT 'PENDING',
35
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
36
- "updatedAt" TIMESTAMP(3) NOT NULL,
37
-
38
- CONSTRAINT "Order_pkey" PRIMARY KEY ("id")
39
- );
40
-
41
- -- CreateTable
42
- CREATE TABLE "OrderItem" (
43
- "id" TEXT NOT NULL,
44
- "orderId" TEXT NOT NULL,
45
- "eventPriceId" TEXT NOT NULL,
46
- "quantity" INTEGER NOT NULL,
47
- "unitPrice" DOUBLE PRECISION NOT NULL,
48
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
49
- "updatedAt" TIMESTAMP(3) NOT NULL,
50
-
51
- CONSTRAINT "OrderItem_pkey" PRIMARY KEY ("id")
52
- );
53
-
54
- -- CreateIndex
55
- CREATE UNIQUE INDEX "Order_paymentIntentId_key" ON "Order"("paymentIntentId");
56
-
57
- -- AddForeignKey
58
- ALTER TABLE "Order" ADD CONSTRAINT "Order_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
59
-
60
- -- AddForeignKey
61
- ALTER TABLE "OrderItem" ADD CONSTRAINT "OrderItem_orderId_fkey" FOREIGN KEY ("orderId") REFERENCES "Order"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
62
-
63
- -- AddForeignKey
64
- ALTER TABLE "OrderItem" ADD CONSTRAINT "OrderItem_eventPriceId_fkey" FOREIGN KEY ("eventPriceId") REFERENCES "EventPrice"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -1,14 +0,0 @@
1
- /*
2
- Warnings:
3
-
4
- - Added the required column `eventId` to the `Order` table without a default value. This is not possible if the table is not empty.
5
-
6
- */
7
- -- AlterTable
8
- ALTER TABLE "Order" ADD COLUMN "eventId" TEXT NOT NULL;
9
-
10
- -- AlterTable
11
- ALTER TABLE "Provider" ALTER COLUMN "email" DROP NOT NULL;
12
-
13
- -- AddForeignKey
14
- ALTER TABLE "Order" ADD CONSTRAINT "Order_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES "Event"("id") ON DELETE RESTRICT ON UPDATE CASCADE;