# Conflicts:
#	src/types/database.d.ts
This commit is contained in:
ACT丶流星雨 2026-03-23 14:24:40 +08:00
commit 187b284c85
4 changed files with 16 additions and 7 deletions

View File

@ -308,17 +308,17 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
builder: (table) => {
table.integer("id").notNullable();
table.integer("scriptId");
table.text("name");
table.text("title");
table.text("prompt");
table.text("description");
table.text("filePath");
table.text("model");
table.text("mode");
table.text("duration");
table.text("resolution");
table.text("frameType");
table.text("frameMode");
table.text("camera");
table.text("sound");
table.text("associateAssetsIds");
table.integer("createTime");
table.primary(["id"]);
table.unique(["id"]);
@ -431,11 +431,20 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
builder: (table) => {
table.integer("id").notNullable();
table.text("flowData").notNullable();
table.integer("stroryboardId").notNullable();
table.integer("storyboardId").notNullable();
table.primary(["id"]);
table.unique(["id"]);
},
},
{
name: "o_assets2Storyboard",
builder: (table) => {
table.integer("storyboardId").notNullable();
table.integer("assetId").notNullable();
table.primary(["assetId", "assetId"]);
table.unique(["storyboardId", "assetId"]);
},
},
];
for (const t of tables) {

View File

@ -12,7 +12,7 @@ export default router.post(
}),
async (req, res) => {
const { id } = req.body;
const storyboardFlowData = await u.db("o_storyboardFlow").where("stroryboardId", id).first();
const storyboardFlowData = await u.db("o_storyboardFlow").where("storyboardId", id).first();
if (storyboardFlowData?.flowData) {
const parseFlow = JSON.parse(storyboardFlowData.flowData);
await Promise.all(

View File

@ -30,7 +30,7 @@ export default router.post(
createTime: Date.now(),
});
await u.db("o_storyboardFlow").insert({
stroryboardId: id,
storyboardId: id,
flowData: JSON.stringify({ edges, nodes }),
});
return res.status(200).send(success());

View File

@ -32,7 +32,7 @@ export default router.post(
.update({ filePath: new URL(imageUrl).pathname });
await u
.db("o_storyboardFlow")
.where("stroryboardId", id)
.where("storyboardId", id)
.update({
flowData: JSON.stringify({ edges, nodes }),
});