-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
10 deletions.
There are no files selected for viewing
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,14 +1,17 @@ | ||
UPDATE blobs SET blobId = REPLACE(blobId, '+', 'X'); | ||
UPDATE blobs SET blobId = REPLACE(blobId, '/', 'Y'); | ||
-- + is normally replaced by X and / by Y, but this can temporarily cause UNIQUE key exception | ||
-- this might create blob duplicates, but cleanup will eventually take care of it | ||
|
||
UPDATE notes SET blobId = REPLACE(blobId, '+', 'X'); | ||
UPDATE notes SET blobId = REPLACE(blobId, '/', 'Y'); | ||
UPDATE blobs SET blobId = REPLACE(blobId, '+', 'A'); | ||
UPDATE blobs SET blobId = REPLACE(blobId, '/', 'B'); | ||
|
||
UPDATE attachments SET blobId = REPLACE(blobId, '+', 'X'); | ||
UPDATE attachments SET blobId = REPLACE(blobId, '/', 'Y'); | ||
UPDATE notes SET blobId = REPLACE(blobId, '+', 'A'); | ||
UPDATE notes SET blobId = REPLACE(blobId, '/', 'B'); | ||
|
||
UPDATE revisions SET blobId = REPLACE(blobId, '+', 'X'); | ||
UPDATE revisions SET blobId = REPLACE(blobId, '/', 'Y'); | ||
UPDATE attachments SET blobId = REPLACE(blobId, '+', 'A'); | ||
UPDATE attachments SET blobId = REPLACE(blobId, '/', 'B'); | ||
|
||
UPDATE entity_changes SET entityId = REPLACE(entityId, '+', 'X') WHERE entityName = 'blobs'; | ||
UPDATE entity_changes SET entityId = REPLACE(entityId, '/', 'Y') WHERE entityName = 'blobs'; | ||
UPDATE revisions SET blobId = REPLACE(blobId, '+', 'A'); | ||
UPDATE revisions SET blobId = REPLACE(blobId, '/', 'B'); | ||
|
||
UPDATE entity_changes SET entityId = REPLACE(entityId, '+', 'A') WHERE entityName = 'blobs'; | ||
UPDATE entity_changes SET entityId = REPLACE(entityId, '/', 'B') WHERE entityName = 'blobs'; |