From af054a6a3e2007c9b5ba4bf8271394b34d730800 Mon Sep 17 00:00:00 2001 From: zorro901 Date: Sat, 11 May 2024 17:31:20 +0900 Subject: [PATCH] Update AdapterAccountType import to AdapterAccount. --- docs/pages/getting-started/adapters/drizzle.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/pages/getting-started/adapters/drizzle.mdx b/docs/pages/getting-started/adapters/drizzle.mdx index c0f6e9b695..69aa79bfd9 100644 --- a/docs/pages/getting-started/adapters/drizzle.mdx +++ b/docs/pages/getting-started/adapters/drizzle.mdx @@ -54,7 +54,7 @@ import { } from "drizzle-orm/pg-core" import postgres from "postgres" import { drizzle } from "drizzle-orm/postgres-js" -import type { AdapterAccountType } from "next-auth/adapters" +import type { AdapterAccount } from "next-auth/adapters" const connectionString = "postgres://postgres:postgres@localhost:5432/drizzle" const pool = postgres(connectionString, { max: 1 }) @@ -77,7 +77,7 @@ export const accounts = pgTable( userId: text("userId") .notNull() .references(() => users.id, { onDelete: "cascade" }), - type: text("type").$type().notNull(), + type: text("type").$type().notNull(), provider: text("provider").notNull(), providerAccountId: text("providerAccountId").notNull(), refresh_token: text("refresh_token"), @@ -130,7 +130,7 @@ import { } from "drizzle-orm/mysql-core" import mysql from "mysql2/promise" import { drizzle } from "drizzle-orm/mysql2" -import type { AdapterAccountType } from "next-auth/adapters" +import type { AdapterAccount } from "next-auth/adapters" export const connection = await mysql.createConnection({ host: "host", @@ -161,7 +161,7 @@ export const accounts = mysqlTable( .notNull() .references(() => users.id, { onDelete: "cascade" }), type: varchar("type", { length: 255 }) - .$type() + .$type() .notNull(), provider: varchar("provider", { length: 255 }).notNull(), providerAccountId: varchar("providerAccountId", { length: 255 }).notNull(), @@ -209,7 +209,7 @@ If you want to modify the schema or add additional fields, you can use the follo import { integer, sqliteTable, text, primaryKey } from "drizzle-orm/sqlite-core" import { createClient } from "@libsql/client" import { drizzle } from "drizzle-orm/libsql" -import type { AdapterAccountType } from "next-auth/adapters" +import type { AdapterAccount } from "next-auth/adapters" const client = createClient({ url: "DATABASE_URL", @@ -233,7 +233,7 @@ export const accounts = sqliteTable( userId: text("userId") .notNull() .references(() => users.id, { onDelete: "cascade" }), - type: text("type").$type().notNull(), + type: text("type").$type().notNull(), provider: text("provider").notNull(), providerAccountId: text("providerAccountId").notNull(), refresh_token: text("refresh_token"),