Loading packages/server/src/tools/seed_palette.ts +19 −10 Original line number Diff line number Diff line Loading @@ -147,6 +147,14 @@ async function main() { }, ]; if (process.argv?.[2] === "sql") { log(`ALTER SEQUENCE "PaletteColor_id_seq" RESTART WITH 1;`); for (const { name, hex } of palette) { log( `INSERT INTO "PaletteColor" (name, hex) VALUES ('${name}', '${hex}');` ); } } else { for (const { name, hex } of palette) { log("Ensuring color", { name, hex }); await prisma.paletteColor.upsert({ Loading @@ -159,6 +167,7 @@ async function main() { }); } } } main() .then(async () => { Loading Loading
packages/server/src/tools/seed_palette.ts +19 −10 Original line number Diff line number Diff line Loading @@ -147,6 +147,14 @@ async function main() { }, ]; if (process.argv?.[2] === "sql") { log(`ALTER SEQUENCE "PaletteColor_id_seq" RESTART WITH 1;`); for (const { name, hex } of palette) { log( `INSERT INTO "PaletteColor" (name, hex) VALUES ('${name}', '${hex}');` ); } } else { for (const { name, hex } of palette) { log("Ensuring color", { name, hex }); await prisma.paletteColor.upsert({ Loading @@ -159,6 +167,7 @@ async function main() { }); } } } main() .then(async () => { Loading