add9365250
Schema domains: users/auth, recipes, social, meal-planning, tiers/usage, webhooks. Includes Better Auth tables, audit_logs, site_settings, push_subscriptions, user_model_prefs, user_nutrition_goals. Migrations 0000–0008 applied.
34 lines
659 B
TypeScript
34 lines
659 B
TypeScript
import { db } from "./client";
|
|
import { tierDefinitions } from "./schema";
|
|
|
|
async function seed() {
|
|
console.log("Seeding tier definitions...");
|
|
await db
|
|
.insert(tierDefinitions)
|
|
.values([
|
|
{
|
|
tier: "free",
|
|
maxRecipes: 50,
|
|
aiCallsPerMonth: 10,
|
|
storageMb: 500,
|
|
maxPublicRecipes: 5,
|
|
},
|
|
{
|
|
tier: "pro",
|
|
maxRecipes: 99999,
|
|
aiCallsPerMonth: 500,
|
|
storageMb: 10000,
|
|
maxPublicRecipes: 99999,
|
|
},
|
|
])
|
|
.onConflictDoNothing();
|
|
|
|
console.log("Seed complete.");
|
|
process.exit(0);
|
|
}
|
|
|
|
seed().catch((err) => {
|
|
console.error(err);
|
|
process.exit(1);
|
|
});
|