mirror of
https://github.com/Floriansylvain/SnippetsManager.git
synced 2026-10-19 00:34:11 +02:00
DB improv., sessions/users handlers improv.
This commit is contained in:
1 parent
7bd6edfd70
commit
f261dc5f93
8 files changed
+193
-108
No files matched your search
@@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE `Snippet` MODIFY `created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3);
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `User` MODIFY `created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3);
|
||||
@@ -13,8 +13,8 @@ model User {
|
||||
password String
|
||||
name String
|
||||
picture_path String
|
||||
created_at DateTime
|
||||
updated_at DateTime
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
Snippet Snippet[]
|
||||
Category Category[]
|
||||
}
|
||||
@@ -23,8 +23,8 @@ model Snippet {
|
||||
id Int @id @default(autoincrement())
|
||||
title String
|
||||
code String
|
||||
created_at DateTime
|
||||
updated_at DateTime
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
|
||||
user_id Int
|
||||
user User @relation(fields: [user_id], references: [id])
|
||||
|
||||
Reference in new issue
Block a user