forked from go-shiori/shiori
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove manual transaction on sqlite migration 2 (go-shiori#468)
- Loading branch information
Showing
2 changed files
with
0 additions
and
4 deletions.
There are no files selected for viewing
2 changes: 0 additions & 2 deletions
2
internal/database/migrations/sqlite/0002_denormalize_content.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
BEGIN TRANSACTION; | ||
ALTER TABLE bookmark DROP COLUMN has_content; | ||
COMMIT; |
2 changes: 0 additions & 2 deletions
2
internal/database/migrations/sqlite/0002_denormalize_content.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
BEGIN TRANSACTION; | ||
ALTER TABLE bookmark | ||
ADD has_content BOOLEAN DEFAULT FALSE NOT NULL; | ||
|
||
UPDATE bookmark | ||
SET has_content = bc.has_content FROM (SELECT docid, content <> '' AS has_content FROM bookmark_content) AS bc | ||
WHERE bookmark.id = bc.docid; | ||
COMMIT; |