Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

chore: format notification preference database files

Tinc799f5f699f5
diff --git a/apps/api/src/database/index.ts b/apps/api/src/database/index.ts
index 7587a0d3e..7ccac5764 100644
--- a/apps/api/src/database/index.ts
+++ b/apps/api/src/database/index.ts
@@ -21,10 +21,10 @@ import {
teamMemberTableRelations,
teamTableRelations,
timeEntryTableRelations,
- userTableRelations,
userNotificationPreferenceTableRelations,
userNotificationWorkspaceProjectTableRelations,
userNotificationWorkspaceRuleTableRelations,
+ userTableRelations,
verificationTableRelations,
workflowRuleTableRelations,
workspaceTableRelations,
@@ -50,10 +50,10 @@ import {
teamMemberTable,
teamTable,
timeEntryTable,
- userTable,
userNotificationPreferenceTable,
userNotificationWorkspaceProjectTable,
userNotificationWorkspaceRuleTable,
+ userTable,
verificationTable,
workflowRuleTable,
workspaceTable,
diff --git a/apps/api/src/database/relations.ts b/apps/api/src/database/relations.ts
index 9d57a9d78..603ad18d3 100644
--- a/apps/api/src/database/relations.ts
+++ b/apps/api/src/database/relations.ts
@@ -19,10 +19,10 @@ import {
teamMemberTable,
teamTable,
timeEntryTable,
- userTable,
userNotificationPreferenceTable,
userNotificationWorkspaceProjectTable,
userNotificationWorkspaceRuleTable,
+ userTable,
verificationTable,
workflowRuleTable,
workspaceTable,
diff --git a/apps/api/src/database/schema.ts b/apps/api/src/database/schema.ts
index ae4ac4fa7..428941f7d 100644
--- a/apps/api/src/database/schema.ts
+++ b/apps/api/src/database/schema.ts
@@ -429,27 +429,30 @@ export const notificationTable = pgTable("notification", {
.notNull(),
});
-export const userNotificationPreferenceTable = pgTable("user_notification_preference", {
- userId: text("user_id")
- .primaryKey()
- .references(() => userTable.id, {
- onDelete: "cascade",
- onUpdate: "cascade",
- }),
- emailEnabled: boolean("email_enabled").default(false).notNull(),
- ntfyEnabled: boolean("ntfy_enabled").default(false).notNull(),
- ntfyServerUrl: text("ntfy_server_url"),
- ntfyTopic: text("ntfy_topic"),
- ntfyToken: text("ntfy_token"),
- webhookEnabled: boolean("webhook_enabled").default(false).notNull(),
- webhookUrl: text("webhook_url"),
- webhookSecret: text("webhook_secret"),
- createdAt: timestamp("created_at", { mode: "date" }).defaultNow().notNull(),
- updatedAt: timestamp("updated_at", { mode: "date" })
- .defaultNow()
- .$onUpdate(() => new Date())
- .notNull(),
-});
+export const userNotificationPreferenceTable = pgTable(
+ "user_notification_preference",
+ {
+ userId: text("user_id")
+ .primaryKey()
+ .references(() => userTable.id, {
+ onDelete: "cascade",
+ onUpdate: "cascade",
+ }),
+ emailEnabled: boolean("email_enabled").default(false).notNull(),
+ ntfyEnabled: boolean("ntfy_enabled").default(false).notNull(),
+ ntfyServerUrl: text("ntfy_server_url"),
+ ntfyTopic: text("ntfy_topic"),
+ ntfyToken: text("ntfy_token"),
+ webhookEnabled: boolean("webhook_enabled").default(false).notNull(),
+ webhookUrl: text("webhook_url"),
+ webhookSecret: text("webhook_secret"),
+ createdAt: timestamp("created_at", { mode: "date" }).defaultNow().notNull(),
+ updatedAt: timestamp("updated_at", { mode: "date" })
+ .defaultNow()
+ .$onUpdate(() => new Date())
+ .notNull(),
+ },
+);
export const userNotificationWorkspaceRuleTable = pgTable(
"user_notification_workspace_rule",