Skip to content

Commit a656782

Browse files
committed
refactor(db): posts schema and prod push script
1 parent 1ec5ccb commit a656782

6 files changed

+6
-96
lines changed

db/migrations/0000_silent_smasher.sql db/migrations/0000_flimsy_bloodaxe.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS "posts" (
55
"tag" text NOT NULL,
66
"cover" text,
77
"content" text NOT NULL,
8-
"description" text DEFAULT 'default:' NOT NULL,
8+
"description" text NOT NULL,
99
"created_at" timestamp DEFAULT now() NOT NULL,
1010
"draft" boolean DEFAULT false NOT NULL
1111
);

db/migrations/0001_stormy_energizer.sql

-1
This file was deleted.

db/migrations/meta/0000_snapshot.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "04cf5614-0ac7-4007-8d19-a50f67424b29",
2+
"id": "3b0fe357-e666-45c7-93ff-b2411e6eedc8",
33
"prevId": "00000000-0000-0000-0000-000000000000",
44
"version": "7",
55
"dialect": "postgresql",
@@ -48,8 +48,7 @@
4848
"name": "description",
4949
"type": "text",
5050
"primaryKey": false,
51-
"notNull": true,
52-
"default": "'default:'"
51+
"notNull": true
5352
},
5453
"created_at": {
5554
"name": "created_at",

db/migrations/meta/0001_snapshot.json

-82
This file was deleted.

db/migrations/meta/_journal.json

+2-9
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@
55
{
66
"idx": 0,
77
"version": "7",
8-
"when": 1728442840815,
9-
"tag": "0000_silent_smasher",
10-
"breakpoints": true
11-
},
12-
{
13-
"idx": 1,
14-
"version": "7",
15-
"when": 1728443335073,
16-
"tag": "0001_stormy_energizer",
8+
"when": 1728460893082,
9+
"tag": "0000_flimsy_bloodaxe",
1710
"breakpoints": true
1811
}
1912
]

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"db:migrate": "drizzle-kit migrate --config=./drizzle.config.ts",
1717
"db:migrate:prod": "cross-env NODE_ENV=production dotenvx run -f .env.production.local -- drizzle-kit migrate --config=./drizzle.config.ts",
1818
"db:push": "drizzle-kit push --config=./drizzle.config.ts",
19+
"db:push:prod": "cross-env NODE_ENV=production dotenvx run -f .env.production.local -- drizzle-kit push --config=./drizzle.config.ts",
1920
"db:studio": "drizzle-kit studio --config=./drizzle.config.ts",
2021
"prepare": "husky"
2122
},

0 commit comments

Comments
 (0)