feat: add times of creation and update to the project model

This commit is contained in:
Matouš Volf
2024-09-06 17:49:12 +02:00
parent 32a0a4072a
commit 32e25a5f8b
4 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,5 @@
-- This file should undo anything in `up.sql`
ALTER TABLE "projects" DROP COLUMN "created_at";
ALTER TABLE "projects" DROP COLUMN "updated_at";

View File

@ -0,0 +1,7 @@
-- Your SQL goes here
ALTER TABLE "projects" ADD COLUMN "created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE "projects" ADD COLUMN "updated_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
SELECT diesel_manage_updated_at('projects');