mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(db): update image-board relationships on add
Functionally, `add_image_to_board()` now moves images between boards.
This commit is contained in:
parent
daadf6ebfd
commit
8bce234542
@ -139,9 +139,10 @@ class SqliteBoardImageRecordStorage(BoardImageRecordStorageBase):
|
|||||||
self._cursor.execute(
|
self._cursor.execute(
|
||||||
"""--sql
|
"""--sql
|
||||||
INSERT INTO board_images (board_id, image_name)
|
INSERT INTO board_images (board_id, image_name)
|
||||||
VALUES (?, ?);
|
VALUES (?, ?)
|
||||||
|
ON CONFLICT (image_name) DO UPDATE SET board_id = ?;
|
||||||
""",
|
""",
|
||||||
(board_id, image_name),
|
(board_id, image_name, board_id),
|
||||||
)
|
)
|
||||||
self._conn.commit()
|
self._conn.commit()
|
||||||
except sqlite3.Error as e:
|
except sqlite3.Error as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user