Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

refactor(auth): replace deprecated getTableColumns with getColumns (#3606)

Hoàng Anh Tuấnc5c28b976a44
diff --git a/packages/auth/src/oauth-schema.test.ts b/packages/auth/src/oauth-schema.test.ts
index 53817b114..598067656 100644
--- a/packages/auth/src/oauth-schema.test.ts
+++ b/packages/auth/src/oauth-schema.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import { oauthProvider } from "@better-auth/oauth-provider";
-import { getTableColumns, is, Table } from "drizzle-orm";
+import { getColumns, is, Table } from "drizzle-orm";
import * as dbSchema from "@reactive-resume/db/schema";
const plugin = oauthProvider({ loginPage: "/login", consentPage: "/consent" });
@@ -10,7 +10,7 @@ describe("OAuth provider persistence schema", () => {
const table = Reflect.get(dbSchema, modelName);
expect(is(table, Table), `Missing table ${modelName}`).toBe(true);
if (!is(table, Table)) return;
- const columns = getTableColumns(table);
+ const columns = getColumns(table);
for (const field of Object.keys(model.fields)) {
expect(columns, `${modelName}.${field}`).toHaveProperty(field);
}