{"action":"created","issue":{"url":"https://api.github.com/repos/datamapper/dm-migrations/issues/54","labels_url":"https://api.github.com/repos/datamapper/dm-migrations/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/datamapper/dm-migrations/issues/54/comments","events_url":"https://api.github.com/repos/datamapper/dm-migrations/issues/54/events","html_url":"https://github.com/datamapper/dm-migrations/pull/54","id":53276365,"number":54,"title":"Inherit DB field type from superclass","user":{"login":"tillsc","id":311544,"avatar_url":"https://avatars.githubusercontent.com/u/311544?v=3","gravatar_id":"","url":"https://api.github.com/users/tillsc","html_url":"https://github.com/tillsc","followers_url":"https://api.github.com/users/tillsc/followers","following_url":"https://api.github.com/users/tillsc/following{/other_user}","gists_url":"https://api.github.com/users/tillsc/gists{/gist_id}","starred_url":"https://api.github.com/users/tillsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tillsc/subscriptions","organizations_url":"https://api.github.com/users/tillsc/orgs","repos_url":"https://api.github.com/users/tillsc/repos","events_url":"https://api.github.com/users/tillsc/events{/privacy}","received_events_url":"https://api.github.com/users/tillsc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-02T20:38:07Z","updated_at":"2015-01-02T20:40:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/datamapper/dm-migrations/pulls/54","html_url":"https://github.com/datamapper/dm-migrations/pull/54","diff_url":"https://github.com/datamapper/dm-migrations/pull/54.diff","patch_url":"https://github.com/datamapper/dm-migrations/pull/54.patch"},"body":"Problem: All custom DataMapper::Properties (e.g. in dm-types) have database field types based upon their Ruby primitives. Especially Properties inheriting from DataMapper::Property::Text like DataMapper::Property::JSON have some problems with that behavior (since they will result in VARCARs instead of LOBs).\r\n\r\nThis commit adds logic to try to find a database field type based upon the superclasses of the (custom) property. Only if no superclass has a direkt mapping from Property.class to field type the fallback to the Ruby primitive (returned by `dump_as`) will take place."},"comment":{"url":"https://api.github.com/repos/datamapper/dm-migrations/issues/comments/68560281","html_url":"https://github.com/datamapper/dm-migrations/pull/54#issuecomment-68560281","issue_url":"https://api.github.com/repos/datamapper/dm-migrations/issues/54","id":68560281,"user":{"login":"tillsc","id":311544,"avatar_url":"https://avatars.githubusercontent.com/u/311544?v=3","gravatar_id":"","url":"https://api.github.com/users/tillsc","html_url":"https://github.com/tillsc","followers_url":"https://api.github.com/users/tillsc/followers","following_url":"https://api.github.com/users/tillsc/following{/other_user}","gists_url":"https://api.github.com/users/tillsc/gists{/gist_id}","starred_url":"https://api.github.com/users/tillsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tillsc/subscriptions","organizations_url":"https://api.github.com/users/tillsc/orgs","repos_url":"https://api.github.com/users/tillsc/repos","events_url":"https://api.github.com/users/tillsc/events{/privacy}","received_events_url":"https://api.github.com/users/tillsc/received_events","type":"User","site_admin":false},"created_at":"2015-01-02T20:40:07Z","updated_at":"2015-01-02T20:40:07Z","body":"I'm sorry for the old school style `while` loops. But I tried not to change the class signatures."}}