mirror of
https://github.com/ershisan99/www.git
synced 2025-12-17 12:34:17 +00:00
persist logs
This commit is contained in:
@@ -163,3 +163,19 @@ export const releasesRelations = relations(releases, ({ one }) => ({
|
||||
references: [branches.id],
|
||||
}),
|
||||
}))
|
||||
|
||||
export const logFiles = pgTable('log_files', {
|
||||
id: integer('id').primaryKey().generatedByDefaultAsIdentity(),
|
||||
userId: text('user_id').references(() => users.id),
|
||||
fileName: text('file_name').notNull(),
|
||||
fileUrl: text('file_url').notNull(),
|
||||
parsedJson: json('parsed_json').notNull(),
|
||||
createdAt: timestamp('created_at').notNull().defaultNow(),
|
||||
})
|
||||
|
||||
export const logFilesRelations = relations(logFiles, ({ one }) => ({
|
||||
user: one(users, {
|
||||
fields: [logFiles.userId],
|
||||
references: [users.id],
|
||||
}),
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user