-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add begin date and end date attribute to relationship #1073
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,118 @@ | ||||||||||||||
BEGIN; | ||||||||||||||
|
||||||||||||||
INSERT INTO bookbrainz.relationship_attribute_type (id, parent, root, child_order, name, description) | ||||||||||||||
VALUES | ||||||||||||||
(3, NULL, 1, 0, 'Begin date', 'This attribute indicates when the relationship begin.'), | ||||||||||||||
Comment on lines
+3
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here you can omit the id, as it is defined to be of type
Suggested change
|
||||||||||||||
(4, NULL, 1, 0, 'End date', 'This attribute indicates when the relationship ended.'); | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above:
Suggested change
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||
INSERT INTO bookbrainz.relationship_type__attribute_type (relationship_type, attribute_type) | ||||||||||||||
VALUES | ||||||||||||||
-- Author -- | ||||||||||||||
(8, 3), | ||||||||||||||
(8, 4), | ||||||||||||||
|
||||||||||||||
-- Marriage -- | ||||||||||||||
(11,3), | ||||||||||||||
(11,4), | ||||||||||||||
|
||||||||||||||
-- Involved with -- | ||||||||||||||
(12,3), | ||||||||||||||
(12,4), | ||||||||||||||
|
||||||||||||||
-- Member of Group -- | ||||||||||||||
(13,3), | ||||||||||||||
(13,4), | ||||||||||||||
|
||||||||||||||
-- Subgroup -- | ||||||||||||||
(16,3), | ||||||||||||||
(16,4), | ||||||||||||||
|
||||||||||||||
-- Collaboration -- | ||||||||||||||
(19,3), | ||||||||||||||
(19,4), | ||||||||||||||
|
||||||||||||||
-- translated -- | ||||||||||||||
(9,3), | ||||||||||||||
(9,4), | ||||||||||||||
|
||||||||||||||
-- Adaptor -- | ||||||||||||||
(62,3), | ||||||||||||||
(62,4), | ||||||||||||||
|
||||||||||||||
-- Worked On -- | ||||||||||||||
(1,3), | ||||||||||||||
(1,4), | ||||||||||||||
|
||||||||||||||
-- Artist -- | ||||||||||||||
(33,3), | ||||||||||||||
(33,4), | ||||||||||||||
|
||||||||||||||
-- Illustrator -- | ||||||||||||||
(2,3), | ||||||||||||||
(2,4), | ||||||||||||||
(29,3), | ||||||||||||||
(29,4), | ||||||||||||||
|
||||||||||||||
-- Photographer -- | ||||||||||||||
(26,3), | ||||||||||||||
(26,4), | ||||||||||||||
(59,3), | ||||||||||||||
(59,4), | ||||||||||||||
|
||||||||||||||
-- Penciller -- | ||||||||||||||
(60,3), | ||||||||||||||
(60,4), | ||||||||||||||
|
||||||||||||||
-- Colourist -- | ||||||||||||||
(61,3), | ||||||||||||||
(61,4), | ||||||||||||||
|
||||||||||||||
-- Inker -- | ||||||||||||||
(30,3), | ||||||||||||||
(30,4), | ||||||||||||||
|
||||||||||||||
-- Letterer -- | ||||||||||||||
(32,3), | ||||||||||||||
(32,4), | ||||||||||||||
|
||||||||||||||
-- Other -- | ||||||||||||||
(58,3), | ||||||||||||||
(58,4), | ||||||||||||||
|
||||||||||||||
-- Editor -- | ||||||||||||||
(5,3), | ||||||||||||||
(5,4), | ||||||||||||||
|
||||||||||||||
-- Proofreader -- | ||||||||||||||
(22,3), | ||||||||||||||
(22,4), | ||||||||||||||
|
||||||||||||||
-- Compiler -- | ||||||||||||||
(23,3), | ||||||||||||||
(23,4), | ||||||||||||||
|
||||||||||||||
-- Designer -- | ||||||||||||||
(24,3), | ||||||||||||||
(24,4), | ||||||||||||||
|
||||||||||||||
-- Blurb -- | ||||||||||||||
(27,3), | ||||||||||||||
(27,4), | ||||||||||||||
|
||||||||||||||
-- Art Director -- | ||||||||||||||
(28,3), | ||||||||||||||
(28,4), | ||||||||||||||
|
||||||||||||||
-- Employee -- | ||||||||||||||
(21,3), | ||||||||||||||
(21,4); | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A few suggested additions, after looking more closely at the relationship_type table:
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||
COMMIT; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1055,4 +1055,121 @@ CREATE VIEW bookbrainz.work_import AS | |
LEFT JOIN bookbrainz.alias_set alias_set ON work_data.alias_set_id = alias_set.id | ||
WHERE import.type = 'Work'; | ||
|
||
|
||
INSERT INTO bookbrainz.relationship_attribute_type (id, parent, root, child_order, name, description) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file should not be changed in this case. |
||
VALUES | ||
(3, NULL, 1, 0, 'Begin date', 'This attribute indicates when the relationship begin.'), | ||
(4, NULL, 1, 0, 'End date', 'This attribute indicates when the relationship ended.'); | ||
|
||
|
||
|
||
|
||
INSERT INTO bookbrainz.relationship_type__attribute_type (relationship_type, attribute_type) | ||
VALUES | ||
-- Author -- | ||
(8, 3), | ||
(8, 4), | ||
|
||
-- Marriage -- | ||
(11,3), | ||
(11,4), | ||
|
||
-- Involved with -- | ||
(12,3), | ||
(12,4), | ||
|
||
-- Member of Group -- | ||
(13,3), | ||
(13,4), | ||
|
||
-- Subgroup -- | ||
(16,3), | ||
(16,4), | ||
|
||
-- Collaboration -- | ||
(19,3), | ||
(19,4), | ||
|
||
-- translated -- | ||
(9,3), | ||
(9,4), | ||
|
||
-- Adaptor -- | ||
(62,3), | ||
(62,4), | ||
|
||
-- Worked On -- | ||
(1,3), | ||
(1,4), | ||
|
||
-- Artist -- | ||
(33,3), | ||
(33,4), | ||
|
||
-- Illustrator -- | ||
(2,3), | ||
(2,4), | ||
(29,3), | ||
(29,4), | ||
|
||
-- Photographer -- | ||
(26,3), | ||
(26,4), | ||
(59,3), | ||
(59,4), | ||
|
||
-- Penciller -- | ||
(60,3), | ||
(60,4), | ||
|
||
-- Colourist -- | ||
(61,3), | ||
(61,4), | ||
|
||
-- Inker -- | ||
(30,3), | ||
(30,4), | ||
|
||
-- Letterer -- | ||
(32,3), | ||
(32,4), | ||
|
||
-- Other -- | ||
(58,3), | ||
(58,4), | ||
|
||
-- Editor -- | ||
(5,3), | ||
(5,4), | ||
|
||
-- Proofreader -- | ||
(22,3), | ||
(22,4), | ||
|
||
-- Compiler -- | ||
(23,3), | ||
(23,4), | ||
|
||
-- Designer -- | ||
(24,3), | ||
(24,4), | ||
|
||
-- Blurb -- | ||
(27,3), | ||
(27,4), | ||
|
||
-- Art Director -- | ||
(28,3), | ||
(28,4), | ||
|
||
-- Employee -- | ||
(21,3), | ||
(21,4); | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
COMMIT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.