You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
699 B

const { PrismaClient } = require("@prisma/client");
const prisma = new PrismaClient();
async function main() {
const settings = [
{ label: "multi_user_mode", value: "false" },
{ label: "logo_filename", value: "anything-llm.png" },
];
for (let setting of settings) {
const existing = await prisma.system_settings.findUnique({
where: { label: setting.label },
});
// Only create the setting if it doesn't already exist
if (!existing) {
await prisma.system_settings.create({
data: setting,
});
}
}
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});