feat: migrate setup visibility from boolean to three-tier system
Replace isPublic boolean with visibility enum (private/link/public) across the full stack. Add shares table to schema for future share link support. Update all services, routes, schemas, hooks, components, and tests. Plan: 32-01 (Setup Sharing System - Schema Migration) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ async function insertPublicSetup(
|
||||
) {
|
||||
const [setup] = await db
|
||||
.insert(setups)
|
||||
.values({ name, userId, isPublic: true })
|
||||
.values({ name, userId, visibility: "public" })
|
||||
.returning();
|
||||
for (const itemId of itemIds) {
|
||||
await db.insert(setupItems).values({ setupId: setup.id, itemId });
|
||||
@@ -62,7 +62,7 @@ async function insertPrivateSetup(
|
||||
) {
|
||||
const [setup] = await db
|
||||
.insert(setups)
|
||||
.values({ name, userId, isPublic: false })
|
||||
.values({ name, userId, visibility: "private" })
|
||||
.returning();
|
||||
return setup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user