mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-21 03:04:32 +00:00
Complete Foundry refactor checklist
This commit is contained in:
parent
40bed3b0a1
commit
13fc9cb318
91 changed files with 5091 additions and 4108 deletions
|
|
@ -1,16 +1,25 @@
|
|||
import { check, integer, primaryKey, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { DEFAULT_WORKSPACE_MODEL_ID } from "@sandbox-agent/foundry-shared";
|
||||
|
||||
/** Better Auth core model — schema defined at https://better-auth.com/docs/concepts/database */
|
||||
export const authUsers = sqliteTable("user", {
|
||||
id: text("id").notNull().primaryKey(),
|
||||
name: text("name").notNull(),
|
||||
email: text("email").notNull(),
|
||||
emailVerified: integer("email_verified").notNull(),
|
||||
image: text("image"),
|
||||
createdAt: integer("created_at").notNull(),
|
||||
updatedAt: integer("updated_at").notNull(),
|
||||
});
|
||||
export const authUsers = sqliteTable(
|
||||
"user",
|
||||
{
|
||||
id: integer("id").primaryKey(),
|
||||
authUserId: text("auth_user_id").notNull(),
|
||||
name: text("name").notNull(),
|
||||
email: text("email").notNull(),
|
||||
emailVerified: integer("email_verified").notNull(),
|
||||
image: text("image"),
|
||||
createdAt: integer("created_at").notNull(),
|
||||
updatedAt: integer("updated_at").notNull(),
|
||||
},
|
||||
(table) => ({
|
||||
authUserIdIdx: uniqueIndex("user_auth_user_id_idx").on(table.authUserId),
|
||||
singletonCheck: check("user_singleton_id_check", sql`${table.id} = 1`),
|
||||
}),
|
||||
);
|
||||
|
||||
/** Better Auth core model — schema defined at https://better-auth.com/docs/concepts/database */
|
||||
export const authSessions = sqliteTable(
|
||||
|
|
@ -62,7 +71,7 @@ export const userProfiles = sqliteTable(
|
|||
githubAccountId: text("github_account_id"),
|
||||
githubLogin: text("github_login"),
|
||||
roleLabel: text("role_label").notNull(),
|
||||
defaultModel: text("default_model").notNull().default("claude-sonnet-4"),
|
||||
defaultModel: text("default_model").notNull().default(DEFAULT_WORKSPACE_MODEL_ID),
|
||||
eligibleOrganizationIdsJson: text("eligible_organization_ids_json").notNull(),
|
||||
starterRepoStatus: text("starter_repo_status").notNull(),
|
||||
starterRepoStarredAt: integer("starter_repo_starred_at"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue