@valentine-efagene/qshelter-common 2.0.56 → 2.0.57

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valentine-efagene/qshelter-common",
3
- "version": "2.0.56",
3
+ "version": "2.0.57",
4
4
  "description": "Shared database schemas and utilities for QShelter services",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -0,0 +1,37 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `createdAt` on the `contract_events` table. All the data in the column will be lost.
5
+ - You are about to drop the column `event` on the `contract_events` table. All the data in the column will be lost.
6
+ - You are about to alter the column `data` on the `contract_events` table. The data in that column could be lost. The data in that column will be cast from `Text` to `Json`.
7
+ - You are about to drop the `contract_transitions` table. If the table is not empty, all the data it contains will be lost.
8
+ - Added the required column `eventType` to the `contract_events` table without a default value. This is not possible if the table is not empty.
9
+
10
+ */
11
+ -- DropForeignKey
12
+ ALTER TABLE `contract_transitions` DROP FOREIGN KEY `contract_transitions_contractId_fkey`;
13
+
14
+ -- AlterTable
15
+ ALTER TABLE `contract_events` DROP COLUMN `createdAt`,
16
+ DROP COLUMN `event`,
17
+ ADD COLUMN `actorId` VARCHAR(191) NULL,
18
+ ADD COLUMN `actorType` VARCHAR(191) NULL,
19
+ ADD COLUMN `eventGroup` VARCHAR(191) NULL,
20
+ ADD COLUMN `eventType` VARCHAR(191) NOT NULL,
21
+ ADD COLUMN `fromState` VARCHAR(191) NULL,
22
+ ADD COLUMN `occurredAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
23
+ ADD COLUMN `toState` VARCHAR(191) NULL,
24
+ ADD COLUMN `trigger` VARCHAR(191) NULL,
25
+ MODIFY `data` JSON NULL;
26
+
27
+ -- DropTable
28
+ DROP TABLE `contract_transitions`;
29
+
30
+ -- CreateIndex
31
+ CREATE INDEX `contract_events_eventType_idx` ON `contract_events`(`eventType`);
32
+
33
+ -- CreateIndex
34
+ CREATE INDEX `contract_events_eventGroup_idx` ON `contract_events`(`eventGroup`);
35
+
36
+ -- CreateIndex
37
+ CREATE INDEX `contract_events_occurredAt_idx` ON `contract_events`(`occurredAt`);