mirror of
https://git.sr.ht/~roxwize/mipilin
synced 2025-05-10 23:33:07 +00:00
Rae from website
Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
parent
453a143bfa
commit
a3e6df6ce8
13 changed files with 691 additions and 35 deletions
12
db/schema.ts
12
db/schema.ts
|
@ -38,6 +38,18 @@ export const journalEntries = pgTable("journal_entries", {
|
|||
date: timestamp().notNull()
|
||||
});
|
||||
|
||||
export const journalComments = pgTable("journal_comments", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity(),
|
||||
user: integer()
|
||||
.references(() => users.id, { onDelete: "cascade" })
|
||||
.notNull(),
|
||||
entry: integer()
|
||||
.references(() => journalEntries.id, { onDelete: "cascade" })
|
||||
.notNull(),
|
||||
content: varchar({ length: 512 }).notNull(),
|
||||
date: timestamp().notNull()
|
||||
});
|
||||
|
||||
export const profiles = pgTable("profiles", {
|
||||
user: integer()
|
||||
.references(() => users.id, { onDelete: "cascade" })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue