mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 11:24:57 -05:00
Remove the account issuer column introduced in 1.7.0 together with account.identityStrategy, the accountIssuer provider option, and the guided auth migrate plan/apply workflow. Accounts are recognized by (providerId, accountId) as in 1.6.
13 lines
1.2 KiB
SQL
13 lines
1.2 KiB
SQL
create table "user" ("id" text not null primary key, "name" text not null, "email" text not null unique, "emailVerified" integer not null, "image" text, "createdAt" date not null, "updatedAt" date not null);
|
|
|
|
create table "session" ("id" text not null primary key, "expiresAt" date not null, "token" text not null unique, "createdAt" date not null, "updatedAt" date not null, "ipAddress" text, "userAgent" text, "userId" text not null references "user" ("id") on delete cascade);
|
|
|
|
create table "account" ("id" text not null primary key, "accountId" text not null, "providerId" text not null, "userId" text not null references "user" ("id") on delete cascade, "accessToken" text, "refreshToken" text, "idToken" text, "accessTokenExpiresAt" date, "refreshTokenExpiresAt" date, "scope" text, "password" text, "createdAt" date not null, "updatedAt" date not null);
|
|
|
|
create table "verification" ("id" text not null primary key, "identifier" text not null, "value" text not null, "expiresAt" date not null, "createdAt" date not null, "updatedAt" date not null);
|
|
|
|
create index "session_userId_idx" on "session" ("userId");
|
|
|
|
create index "account_userId_idx" on "account" ("userId");
|
|
|
|
create index "verification_identifier_idx" on "verification" ("identifier"); |