{"action":"created","issue":{"url":"https://api.github.com/repos/MTG/dunya/issues/213","labels_url":"https://api.github.com/repos/MTG/dunya/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/MTG/dunya/issues/213/comments","events_url":"https://api.github.com/repos/MTG/dunya/issues/213/events","html_url":"https://github.com/MTG/dunya/issues/213","id":77556863,"number":213,"title":"Carnatic database structure changes","user":{"login":"alastair","id":19217,"avatar_url":"https://avatars.githubusercontent.com/u/19217?v=3","gravatar_id":"","url":"https://api.github.com/users/alastair","html_url":"https://github.com/alastair","followers_url":"https://api.github.com/users/alastair/followers","following_url":"https://api.github.com/users/alastair/following{/other_user}","gists_url":"https://api.github.com/users/alastair/gists{/gist_id}","starred_url":"https://api.github.com/users/alastair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alastair/subscriptions","organizations_url":"https://api.github.com/users/alastair/orgs","repos_url":"https://api.github.com/users/alastair/repos","events_url":"https://api.github.com/users/alastair/events{/privacy}","received_events_url":"https://api.github.com/users/alastair/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/MTG/dunya/milestones/6","html_url":"https://github.com/MTG/dunya/milestones/Backend","labels_url":"https://api.github.com/repos/MTG/dunya/milestones/6/labels","id":564835,"number":6,"title":"Backend","description":"","creator":{"login":"alastair","id":19217,"avatar_url":"https://avatars.githubusercontent.com/u/19217?v=3","gravatar_id":"","url":"https://api.github.com/users/alastair","html_url":"https://github.com/alastair","followers_url":"https://api.github.com/users/alastair/followers","following_url":"https://api.github.com/users/alastair/following{/other_user}","gists_url":"https://api.github.com/users/alastair/gists{/gist_id}","starred_url":"https://api.github.com/users/alastair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alastair/subscriptions","organizations_url":"https://api.github.com/users/alastair/orgs","repos_url":"https://api.github.com/users/alastair/repos","events_url":"https://api.github.com/users/alastair/events{/privacy}","received_events_url":"https://api.github.com/users/alastair/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":32,"state":"open","created_at":"2014-02-10T15:38:11Z","updated_at":"2015-05-18T08:21:36Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-05-18T08:21:36Z","updated_at":"2015-06-03T11:30:26Z","closed_at":null,"body":"After our discussions we have some changes to the structure of the carnatic models:\r\n![image](https://cloud.githubusercontent.com/assets/19217/7676578/605fd3fc-fd45-11e4-92f2-21191c46273e.jpg)\r\n\r\nThe changes:\r\n\r\n - [x] `Recording.works` `ManyToMany` with through class containing sequence number, instead of 1 work per recording. Almost all recordings have just 1 work, but we need this special case for some of them. Add helper functions to make the normal case easy\r\n - [x] Move `Form` from `Work` to `Recording` with `ManyToMany`\r\n - [x] `Work.raaga`/`taala` change from `ManyToMany` back to single `ForeignKey`. Works only have 1 raaga/taala. If the work has an attribute set, this is the value\r\n - [x] Add `Recording.raagas`/`taalas`. `ManyToMany` with through class with `sequence`. If we have no work set on the recording, get the raaga and taala from tags.\r\n\r\nImporter needs to be changed to take these changes into consideration, plus\r\n\r\n - [ ] Read work attributes\r\n - [ ] We're adding __lyricist__ relations to composers in musicbrainz. We need to import these.\r\n - [ ] If we have a work + attribute and also a tag on a recording: If they're different, this is an error and should be flagged for verification. If they're the same, we can remove the tag.\r\n - [ ] We've merged lots of works - make sure we do the check between query id/received id, and delete the old one\r\n\r\nAPI needs to be changed\r\n - [ ] raaga/taala/form should always be a list\r\n - [ ] Work should maybe add different fields for composer/lyricist\r\n - [ ] Raaga should show all recordings, but you should be able to query `?form=x` to only get recordings in a particular form. Maybe group recordings by form also.\r\n - [ ] `Recording.get_raagas()` should look at `Form`. If a flag is set, get raaga/taala from recording, else work. If we should get from work, and work has none, this is an error and should be fixed in data.\r\n\r\n\r\nExtra list of work stuff for A & V\r\n![image 1](https://cloud.githubusercontent.com/assets/19217/7676854/a2972cd2-fd47-11e4-81c4-01cd5ccf336c.jpg)\r\n"},"comment":{"url":"https://api.github.com/repos/MTG/dunya/issues/comments/108316887","html_url":"https://github.com/MTG/dunya/issues/213#issuecomment-108316887","issue_url":"https://api.github.com/repos/MTG/dunya/issues/213","id":108316887,"user":{"login":"alastair","id":19217,"avatar_url":"https://avatars.githubusercontent.com/u/19217?v=3","gravatar_id":"","url":"https://api.github.com/users/alastair","html_url":"https://github.com/alastair","followers_url":"https://api.github.com/users/alastair/followers","following_url":"https://api.github.com/users/alastair/following{/other_user}","gists_url":"https://api.github.com/users/alastair/gists{/gist_id}","starred_url":"https://api.github.com/users/alastair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alastair/subscriptions","organizations_url":"https://api.github.com/users/alastair/orgs","repos_url":"https://api.github.com/users/alastair/repos","events_url":"https://api.github.com/users/alastair/events{/privacy}","received_events_url":"https://api.github.com/users/alastair/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T11:30:26Z","updated_at":"2015-06-03T11:30:26Z","body":"@vigneshishwar89 We have configured `Recording` to allow multiple forms, for cases when a recording is of more than one song.\r\nWe also have a flag on Form, `attrfromrecording`, which tells us if we should use the Raaga and Taala attached to the recording, or the work.\r\nCould it be possible that we have a recording of 3 songs with 3 forms, 2 works, and raaga/taala from the recording for one of them, and from the work for the others?"}}