@smarttj/core 1.1.2 → 1.1.4

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/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # Pushing to Github & Publishing to NPM
2
+
3
+ ```bash
4
+ git add .
5
+ git commit -m "commit"
6
+ npm version x.x.x # example: npm version 1.1.0
7
+ git push --follow-tags
8
+ ```
9
+
10
+ ## Prisma
11
+
12
+ - Generate migration
13
+
14
+ ```bash
15
+ npm run prisma:migrate
16
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smarttj/core",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Shared enums, constants and database schemas for SmartTJ ecosystem",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -22,7 +22,8 @@
22
22
  "scripts": {
23
23
  "clean": "rimraf dist",
24
24
  "build": "npm run clean && tsc",
25
- "prepare": "npm run build"
25
+ "prepare": "npm run build",
26
+ "prisma:migrate": "npx prisma migrate dev --name init"
26
27
  },
27
28
  "publishConfig": {
28
29
  "access": "public"
@@ -0,0 +1,10 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `message` on the `Banner` table. All the data in the column will be lost.
5
+ - Added the required column `description` to the `Banner` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE "Banner" DROP COLUMN "message",
10
+ ADD COLUMN "description" TEXT NOT NULL;
@@ -0,0 +1,18 @@
1
+ -- CreateTable
2
+ CREATE TABLE "Blog" (
3
+ "id" TEXT NOT NULL,
4
+ "slug" TEXT NOT NULL,
5
+ "title" TEXT NOT NULL,
6
+ "content" TEXT NOT NULL,
7
+ "banner" TEXT NOT NULL,
8
+ "bannerId" TEXT NOT NULL,
9
+ "tag" TEXT NOT NULL,
10
+ "readingTime" INTEGER NOT NULL,
11
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
12
+ "updatedAt" TIMESTAMP(3) NOT NULL,
13
+
14
+ CONSTRAINT "Blog_pkey" PRIMARY KEY ("id")
15
+ );
16
+
17
+ -- CreateIndex
18
+ CREATE UNIQUE INDEX "Blog_slug_key" ON "Blog"("slug");
@@ -785,13 +785,13 @@ enum BannerPosition {
785
785
  }
786
786
 
787
787
  model Banner {
788
- id String @id @default(uuid(7))
789
- title String
790
- message String
791
- url String
792
- position BannerPosition @default(MAIN)
793
- image String?
794
- imageId String?
788
+ id String @id @default(uuid(7))
789
+ title String
790
+ description String
791
+ url String
792
+ position BannerPosition @default(MAIN)
793
+ image String?
794
+ imageId String?
795
795
 
796
796
  createdAt DateTime @default(now())
797
797
  updatedAt DateTime @updatedAt
@@ -817,3 +817,17 @@ model Application {
817
817
 
818
818
  user User? @relation(fields: [userId], references: [id])
819
819
  }
820
+
821
+ model Blog {
822
+ id String @id @default(uuid(7))
823
+ slug String @unique
824
+ title String
825
+ content String
826
+ banner String
827
+ bannerId String
828
+ tag String
829
+ readingTime Int
830
+
831
+ createdAt DateTime @default(now())
832
+ updatedAt DateTime @updatedAt
833
+ }