Files
twenty/packages/twenty-website/src/database/drizzle-posgres.config.ts
T
Abdullah. f7a80d250b Update dizzle-kit and drizzle-orm to avoid the dependency on Hono. (#15343)
Updated both drizzle-kit and drizzle-orm to the latest versions.
Process:
- Ran migrations on the database.
- Updated the versions.
- Made the required changes to `drizzle-posgres.config.ts`.
- Ensured migrations are not out of sync be running them again - no
issues, no updates applied.
- Updated the snapshots.
- Deleted the database named `website`.
- Re-ran the migrations to confirm.

There are no breaking changes because the surface drizzle-orm covers is
limited. However, we had to update drizzle-orm in order to update
drizzle-kit to a version greater than 0.27.0 in order to avoid the use
of hono. Therefore, I went ahead and updated both to the latest.

Resolves [Dependabot Alert
#274](https://github.com/twentyhq/twenty/security/dependabot/274) and
three others.
2025-10-24 16:54:15 +02:00

18 lines
442 B
TypeScript

import "dotenv/config";
import { type Config } from "drizzle-kit";
const dbUrl = new URL(process.env.DATABASE_PG_URL!);
export default {
schema: "./src/database/schema-postgres.ts",
out: "./src/database/migrations",
dialect: "postgresql",
dbCredentials: {
host: dbUrl.hostname,
port: Number(dbUrl.port),
user: dbUrl.username,
password: dbUrl.password,
database: dbUrl.pathname.slice(1),
},
} satisfies Config;