refactor: remove unused files and update logging structure

- Deleted unused configuration and SQL files related to Drizzle.
- Removed deprecated logging methods and updated logging to use a unified structure.
- Cleaned up package dependencies by removing unused packages from package.json and package-lock.json.
- Updated various import paths for consistency and clarity.
- Introduced new action and event models to enhance analytics capabilities.
This commit is contained in:
John Yeo
2025-05-29 14:10:04 +01:00
parent 087c630f55
commit af70142708
67 changed files with 2522 additions and 10649 deletions

View File

@@ -5,7 +5,6 @@ import {
text,
timestamp,
} from "drizzle-orm/pg-core";
import { generateId } from "../../utils/generateId.js";
import { sql } from "drizzle-orm";
import { ActionType, AuthType } from "./actionEnums.js";
import { organizations } from "../orgModels/orgTable.js";
@@ -16,12 +15,9 @@ import { collatePgColumn } from "../../db/utils.js";
export const actions = pgTable(
"actions",
{
id: text()
.primaryKey()
.notNull()
.$defaultFn(() => generateId("act")),
id: text().primaryKey().notNull(),
request_id: text("request_id").unique().notNull(),
request_id: text("request_id").notNull(),
org_id: text("org_id").notNull(),
org_slug: text("org_slug").notNull(),