fix: legacy skills::create mirrors title into new name column
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"db_name": "PostgreSQL",
|
||||||
|
"query": "INSERT INTO skills (id, workspace_id, title, name, author, description, body)\n VALUES ($1, $2, $3, $3, $4, $5, $6)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Left": [
|
||||||
|
"Uuid",
|
||||||
|
"Uuid",
|
||||||
|
"Text",
|
||||||
|
"Text",
|
||||||
|
"Text",
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "c5f7f433a4f4b9ebbd449af7ff7ce7cf7a6703ce73e84c54f8c03ee08f662c80"
|
||||||
|
}
|
||||||
@@ -27,8 +27,10 @@ pub async fn create(
|
|||||||
) -> Result<Skill, DbError> {
|
) -> Result<Skill, DbError> {
|
||||||
let id = Uuid::now_v7();
|
let id = Uuid::now_v7();
|
||||||
sqlx::query!(
|
sqlx::query!(
|
||||||
"INSERT INTO skills (id, workspace_id, title, author, description, body)
|
// `name` is required by the Slice 3.5a skills catalog extension
|
||||||
VALUES ($1, $2, $3, $4, $5, $6)",
|
// (0049) — mirror the title until Slice 9 folds the two columns.
|
||||||
|
"INSERT INTO skills (id, workspace_id, title, name, author, description, body)
|
||||||
|
VALUES ($1, $2, $3, $3, $4, $5, $6)",
|
||||||
id,
|
id,
|
||||||
workspace_id.map(|w| w.as_uuid()),
|
workspace_id.map(|w| w.as_uuid()),
|
||||||
title,
|
title,
|
||||||
|
|||||||
Reference in New Issue
Block a user