mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-01 01:32:16 +00:00
refactor: replace existing organization_role and audit_log tables with new definitions
- Deleted the old SQL files for organization_role and audit_log. - Introduced new SQL file defining organization_role and audit_log with updated foreign key constraints and indexes. - Updated metadata snapshots to reflect the new table structures and relationships. - Adjusted access control permissions for backup and notification operations to include update capabilities.
This commit is contained in:
@@ -11,11 +11,9 @@ export const auditLog = pgTable(
|
||||
.primaryKey()
|
||||
.$defaultFn(() => nanoid()),
|
||||
organizationId: text("organization_id")
|
||||
.notNull()
|
||||
.references(() => organization.id, { onDelete: "cascade" }),
|
||||
.references(() => organization.id, { onDelete: "set null" }),
|
||||
userId: text("user_id")
|
||||
.notNull()
|
||||
.references(() => user.id, { onDelete: "cascade" }),
|
||||
.references(() => user.id, { onDelete: "set null" }),
|
||||
userEmail: text("user_email").notNull(),
|
||||
userRole: text("user_role").notNull(),
|
||||
action: text("action").notNull(),
|
||||
|
||||
Reference in New Issue
Block a user