7d65198298
Remove `enable-default-apps.ts` script, add `disable-deprecated-apps.ts`, update seeding logic in `seed.ts` to set `isActive` to false for documents, and modify `DOCKER.md` and `scripts/package.json` accordingly. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: ac51f801-911b-4be5-b27c-e3212d5c0c73 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/1WKAcHk Replit-Helium-Checkpoint-Created: true
30 lines
777 B
TypeScript
30 lines
777 B
TypeScript
import { db, appsTable } from "@workspace/db";
|
|
import { inArray } from "drizzle-orm";
|
|
|
|
const SLUGS = ["calendar", "notifications", "documents"];
|
|
|
|
async function main() {
|
|
console.log(`Disabling apps: ${SLUGS.join(", ")}...`);
|
|
const updated = await db
|
|
.update(appsTable)
|
|
.set({ isActive: false })
|
|
.where(inArray(appsTable.slug, SLUGS))
|
|
.returning({ slug: appsTable.slug, isActive: appsTable.isActive });
|
|
|
|
if (updated.length === 0) {
|
|
console.warn("No matching apps found — did seed run yet?");
|
|
} else {
|
|
for (const row of updated) {
|
|
console.log(` - ${row.slug} (isActive=${row.isActive})`);
|
|
}
|
|
}
|
|
console.log("Done.");
|
|
}
|
|
|
|
main()
|
|
.catch((err) => {
|
|
console.error(err);
|
|
process.exit(1);
|
|
})
|
|
.finally(() => process.exit(0));
|