a tool for shared writing and social publishing

add interface_state to identity table

+9 -1
+4 -1
actions/createIdentity.ts
··· 8 8 import { v7 } from "uuid"; 9 9 import { PgTransaction } from "drizzle-orm/pg-core"; 10 10 import { NodePgDatabase } from "drizzle-orm/node-postgres"; 11 + import { Json } from "supabase/database.types"; 11 12 12 13 export async function createIdentity( 13 14 db: NodePgDatabase, ··· 43 44 .insert(identities) 44 45 .values({ home_page: permissionToken.id, ...data }) 45 46 .returning(); 46 - return identity; 47 + return identity as Omit<typeof identity, "interface_state"> & { 48 + interface_state: Json; 49 + }; 47 50 }); 48 51 }
+1
drizzle/schema.ts
··· 101 101 home_page: uuid("home_page").notNull().references(() => permission_tokens.id, { onDelete: "cascade" } ), 102 102 email: text("email"), 103 103 atp_did: text("atp_did"), 104 + interface_state: jsonb("interface_state"), 104 105 }, 105 106 (table) => { 106 107 return {
+3
supabase/database.types.ts
··· 461 461 email: string | null 462 462 home_page: string 463 463 id: string 464 + interface_state: Json | null 464 465 } 465 466 Insert: { 466 467 atp_did?: string | null ··· 468 469 email?: string | null 469 470 home_page: string 470 471 id?: string 472 + interface_state?: Json | null 471 473 } 472 474 Update: { 473 475 atp_did?: string | null ··· 475 477 email?: string | null 476 478 home_page?: string 477 479 id?: string 480 + interface_state?: Json | null 478 481 } 479 482 Relationships: [ 480 483 {
+1
supabase/migrations/20250922052532_add_interface_state_col_to_identity_table.sql
··· 1 + alter table "public"."identities" add column "interface_state" jsonb;