-
-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #422 from chinmay-kothari/IMDB_title
BB-463: Identifier "IMDb title ID" fix
- Loading branch information
Showing
2 changed files
with
211 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,105 @@ | ||
BEGIN; | ||
|
||
-- Reverting IMDb identifier back to Edition | ||
UPDATE bookbrainz.identifier_type | ||
SET entity_type='Edition' | ||
|
||
WHERE id=16; | ||
|
||
-- Edition (Around the World in Eighty Days) | ||
DELETE FROM bookbrainz.identifier_set__identifier | ||
WHERE | ||
identifier_id=5377 AND set_id=3318; | ||
|
||
DELETE FROM bookbrainz.identifier_set__identifier | ||
WHERE | ||
identifier_id=5377 AND set_id=3305; | ||
|
||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3345','5377'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3346','5377'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3344','5377'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3333','5377'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3329','5377'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3327','5377'); | ||
|
||
|
||
-- Edition (Ranger's Apprentice: The Ruins of Gorlan) | ||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3412','5550'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3435','5550'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3436','5550'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3439','5550'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3443','5550'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3413','5558'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3383','5482'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3374','5459'); | ||
|
||
DELETE FROM bookbrainz.identifier_set__identifier | ||
WHERE | ||
identifier_id=5459 AND set_id=3373; | ||
|
||
DELETE FROM bookbrainz.identifier_set__identifier | ||
WHERE | ||
identifier_id=5482 AND set_id=3415; | ||
|
||
DELETE FROM bookbrainz.identifier_set__identifier | ||
WHERE | ||
identifier_id=5550 AND set_id=3434; | ||
|
||
|
||
-- Veyipadagalu (IMDb Title Id here was invalid) | ||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3036','4678'); | ||
|
||
-- Edition (തേനും തേനീച്ചപ്പാലും) - Revelant work will be added later | ||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('1997','2584'); | ||
|
||
-- Author (Moheen Reeyad) - Relevant work will be added later | ||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('1469','1783'); | ||
|
||
COMMIT; |
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 |
---|---|---|
@@ -0,0 +1,106 @@ | ||
BEGIN; | ||
-- (BB-463) | ||
|
||
-- IMDb Title ID for Work rather than Edition | ||
UPDATE bookbrainz.identifier_type | ||
SET entity_type='Work' | ||
|
||
WHERE id=16; | ||
|
||
|
||
-- Edition (Around the World in Eighty Days) | ||
INSERT INTO bookbrainz.identifier_set__identifier ("set_id","identifier_id") | ||
VALUES | ||
('3318','5377'); | ||
|
||
INSERT INTO bookbrainz.identifier_set__identifier ("set_id","identifier_id") | ||
VALUES | ||
('3305','5377'); | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5377 AND set_id=3345; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5377 AND set_id=3346; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5377 AND set_id=3344; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5377 AND set_id=3333; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5377 AND set_id=3329; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5377 AND set_id=3327; | ||
|
||
|
||
-- Edition (Ranger's Apprentice: The Ruins of Gorlan) - 4 types of edition | ||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5550 AND set_id=3412; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5550 AND set_id=3435; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5550 AND set_id=3436; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5550 AND set_id=3439; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5550 AND set_id=3443; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5558 AND set_id=3413; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5482 AND set_id=3383; | ||
|
||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=5459 AND set_id=3374; | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3373','5459'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3415','5482'); | ||
|
||
INSERT INTO "bookbrainz"."identifier_set__identifier" ("set_id","identifier_id") | ||
VALUES | ||
('3434','5550'); | ||
|
||
|
||
-- Edition (Veyipadagalu) - IMDb Title Id here was invalid | ||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=4678 AND set_id=3036; | ||
|
||
-- Edition (തേനും തേനീച്ചപ്പാലും) - Revelant work will be added later | ||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=2584 AND set_id=1997; | ||
|
||
-- Author (Moheen Reeyad) - Relevant work will be added later | ||
DELETE FROM "bookbrainz"."identifier_set__identifier" | ||
WHERE | ||
identifier_id=1783 AND set_id=1469; | ||
|
||
COMMIT; |