Skip to content

Commit

Permalink
refactor(db): posts schema and prod push script
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlitgrace committed Oct 9, 2024
1 parent 1ec5ccb commit a656782
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS "posts" (
"tag" text NOT NULL,
"cover" text,
"content" text NOT NULL,
"description" text DEFAULT 'default:' NOT NULL,
"description" text NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"draft" boolean DEFAULT false NOT NULL
);
1 change: 0 additions & 1 deletion db/migrations/0001_stormy_energizer.sql

This file was deleted.

5 changes: 2 additions & 3 deletions db/migrations/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "04cf5614-0ac7-4007-8d19-a50f67424b29",
"id": "3b0fe357-e666-45c7-93ff-b2411e6eedc8",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
Expand Down Expand Up @@ -48,8 +48,7 @@
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'default:'"
"notNull": true
},
"created_at": {
"name": "created_at",
Expand Down
82 changes: 0 additions & 82 deletions db/migrations/meta/0001_snapshot.json

This file was deleted.

11 changes: 2 additions & 9 deletions db/migrations/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@
{
"idx": 0,
"version": "7",
"when": 1728442840815,
"tag": "0000_silent_smasher",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1728443335073,
"tag": "0001_stormy_energizer",
"when": 1728460893082,
"tag": "0000_flimsy_bloodaxe",
"breakpoints": true
}
]
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"db:migrate": "drizzle-kit migrate --config=./drizzle.config.ts",
"db:migrate:prod": "cross-env NODE_ENV=production dotenvx run -f .env.production.local -- drizzle-kit migrate --config=./drizzle.config.ts",
"db:push": "drizzle-kit push --config=./drizzle.config.ts",
"db:push:prod": "cross-env NODE_ENV=production dotenvx run -f .env.production.local -- drizzle-kit push --config=./drizzle.config.ts",
"db:studio": "drizzle-kit studio --config=./drizzle.config.ts",
"prepare": "husky"
},
Expand Down

0 comments on commit a656782

Please sign in to comment.