eleboog-astro/better-auth_migrations/2025-05-08T00-01-52.106Z.sql

59 lines
No EOL
2 KiB
SQL

alter table "user" add column "emailVerified" boolean not null;
alter table "user" add column "createdAt" timestamp not null;
alter table "user" add column "updatedAt" timestamp not null;
alter table "user" add column "username" text unique;
alter table "user" add column "displayUsername" text;
alter table "user" add column "role" text;
alter table "user" add column "banned" boolean;
alter table "user" add column "banReason" text;
alter table "user" add column "banExpires" timestamp;
alter table "session" add column "expiresAt" timestamp not null;
alter table "session" add column "createdAt" timestamp not null;
alter table "session" add column "updatedAt" timestamp not null;
alter table "session" add column "ipAddress" text;
alter table "session" add column "userAgent" text;
alter table "session" add column "userId" text not null references "user" ("id");
alter table "session" add column "impersonatedBy" text;
alter table "account" add column "accountId" text not null;
alter table "account" add column "providerId" text not null;
alter table "account" add column "userId" text not null references "user" ("id");
alter table "account" add column "accessToken" text;
alter table "account" add column "refreshToken" text;
alter table "account" add column "idToken" text;
alter table "account" add column "accessTokenExpiresAt" timestamp;
alter table "account" add column "refreshTokenExpiresAt" timestamp;
alter table "account" add column "createdAt" timestamp not null;
alter table "account" add column "updatedAt" timestamp not null;
alter table "verification" add column "expiresAt" timestamp not null;
alter table "verification" add column "createdAt" timestamp;
alter table "verification" add column "updatedAt" timestamp;
create table "passkey" ("id" text not null primary key, "name" text, "publicKey" text not null, "userId" text not null references "user" ("id"), "credentialID" text not null, "counter" integer not null, "deviceType" text not null, "backedUp" boolean not null, "transports" text, "createdAt" timestamp);