@smarttj/core 1.1.3 → 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.
|
|
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",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"clean": "rimraf dist",
|
|
24
24
|
"build": "npm run clean && tsc",
|
|
25
25
|
"prepare": "npm run build",
|
|
26
|
-
"prisma:migrate": "npx prisma migrate dev --name init
|
|
26
|
+
"prisma:migrate": "npx prisma migrate dev --name init"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
@@ -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");
|
package/prisma/schema.prisma
CHANGED
|
@@ -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
|
+
}
|