@juliobrim/prisma-shared 1.0.6

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.
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "operation_register" ADD COLUMN "quantity" INTEGER NOT NULL DEFAULT 1;
@@ -0,0 +1,20 @@
1
+ -- CreateTable
2
+ CREATE TABLE "iot_message_register" (
3
+ "id" SERIAL NOT NULL,
4
+ "timestamp" TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
5
+ "di1" INTEGER NOT NULL,
6
+ "di2" INTEGER NOT NULL,
7
+ "di3" INTEGER NOT NULL,
8
+ "di4" INTEGER NOT NULL,
9
+ "di1_state" BOOLEAN NOT NULL,
10
+ "di2_state" BOOLEAN NOT NULL,
11
+ "di3_state" BOOLEAN NOT NULL,
12
+ "di4_state" BOOLEAN NOT NULL,
13
+ "machineId" TEXT,
14
+ "tenantId" TEXT,
15
+
16
+ CONSTRAINT "iot_message_register_pkey" PRIMARY KEY ("id")
17
+ );
18
+
19
+ -- AddForeignKey
20
+ ALTER TABLE "iot_message_register" ADD CONSTRAINT "iot_message_register_tenantId_fkey" FOREIGN KEY ("tenantId") REFERENCES "tenant"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,11 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Made the column `machineId` on table `iot_message_register` required. This step will fail if there are existing NULL values in that column.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "iot_message_register" ALTER COLUMN "machineId" SET NOT NULL;
9
+
10
+ -- AddForeignKey
11
+ ALTER TABLE "iot_message_register" ADD CONSTRAINT "iot_message_register_machineId_fkey" FOREIGN KEY ("machineId") REFERENCES "machine"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,3 @@
1
+ # Please do not edit this file manually
2
+ # It should be added in your version-control system (e.g., Git)
3
+ provider = "postgresql"
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@juliobrim/prisma-shared",
3
+ "version": "1.0.6",
4
+ "description": "Schema Prisma compartilhado entre projetos Sabcon",
5
+ "main": "schema.prisma",
6
+ "files": [
7
+ "schema.prisma",
8
+ "migrations/**/*",
9
+ "README.md"
10
+ ],
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "scripts": {
15
+ "generate": "npx prisma generate",
16
+ "migrate:dev": "npx prisma migrate dev",
17
+ "migrate:deploy": "npx prisma migrate deploy",
18
+ "migrate:reset": "npx prisma migrate reset",
19
+ "db:push": "npx prisma db push",
20
+ "format": "npx prisma format",
21
+ "validate": "npx prisma validate",
22
+ "prepublishOnly": "npm run format"
23
+ },
24
+ "keywords": [
25
+ "prisma",
26
+ "database",
27
+ "schema",
28
+ "sabcon",
29
+ "shared"
30
+ ],
31
+ "author": "Sabcon Team",
32
+ "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/juliobrim/prisma-shared.git"
36
+ },
37
+ "bugs": {
38
+ "url": "https://github.com/juliobrim/prisma-shared/issues"
39
+ },
40
+ "homepage": "https://github.com/juliobrim/prisma-shared#readme",
41
+ "devDependencies": {
42
+ "@types/node": "^20.0.0",
43
+ "prisma": "^5.0.0",
44
+ "ts-node": "^10.9.0",
45
+ "typescript": "^5.0.0"
46
+ },
47
+ "peerDependencies": {
48
+ "@prisma/client": "^5.0.0"
49
+ },
50
+ "engines": {
51
+ "node": ">=16.0.0"
52
+ }
53
+ }