{"action":"created","issue":{"url":"https://api.github.com/repos/SchemaPlus/schema_validations/issues/22","labels_url":"https://api.github.com/repos/SchemaPlus/schema_validations/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/SchemaPlus/schema_validations/issues/22/comments","events_url":"https://api.github.com/repos/SchemaPlus/schema_validations/issues/22/events","html_url":"https://github.com/SchemaPlus/schema_validations/pull/22","id":90264886,"number":22,"title":"Implement integral range deduction and validation.","user":{"login":"lowjoel","id":2505070,"avatar_url":"https://avatars.githubusercontent.com/u/2505070?v=3","gravatar_id":"","url":"https://api.github.com/users/lowjoel","html_url":"https://github.com/lowjoel","followers_url":"https://api.github.com/users/lowjoel/followers","following_url":"https://api.github.com/users/lowjoel/following{/other_user}","gists_url":"https://api.github.com/users/lowjoel/gists{/gist_id}","starred_url":"https://api.github.com/users/lowjoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowjoel/subscriptions","organizations_url":"https://api.github.com/users/lowjoel/orgs","repos_url":"https://api.github.com/users/lowjoel/repos","events_url":"https://api.github.com/users/lowjoel/events{/privacy}","received_events_url":"https://api.github.com/users/lowjoel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-23T02:04:26Z","updated_at":"2015-06-28T07:37:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SchemaPlus/schema_validations/pulls/22","html_url":"https://github.com/SchemaPlus/schema_validations/pull/22","diff_url":"https://github.com/SchemaPlus/schema_validations/pull/22.diff","patch_url":"https://github.com/SchemaPlus/schema_validations/pull/22.patch"},"body":"Tested with sqlite3 and postgresql.\r\n\r\nThis uses a protected method, #range, which is implemented in the sqlite3 and postgresql adapters. It seems that they extend an AR type, which calculates the maximum permissible range for a column (as `ActiveRecord::Type::Integer`). I cannot find any other way of accessing that information. Pointers welcome.\r\n\r\nAddresses Coursemology/Coursemology2#353 also."},"comment":{"url":"https://api.github.com/repos/SchemaPlus/schema_validations/issues/comments/116210034","html_url":"https://github.com/SchemaPlus/schema_validations/pull/22#issuecomment-116210034","issue_url":"https://api.github.com/repos/SchemaPlus/schema_validations/issues/22","id":116210034,"user":{"login":"ronen","id":125620,"avatar_url":"https://avatars.githubusercontent.com/u/125620?v=3","gravatar_id":"","url":"https://api.github.com/users/ronen","html_url":"https://github.com/ronen","followers_url":"https://api.github.com/users/ronen/followers","following_url":"https://api.github.com/users/ronen/following{/other_user}","gists_url":"https://api.github.com/users/ronen/gists{/gist_id}","starred_url":"https://api.github.com/users/ronen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronen/subscriptions","organizations_url":"https://api.github.com/users/ronen/orgs","repos_url":"https://api.github.com/users/ronen/repos","events_url":"https://api.github.com/users/ronen/events{/privacy}","received_events_url":"https://api.github.com/users/ronen/received_events","type":"User","site_admin":false},"created_at":"2015-06-28T07:37:48Z","updated_at":"2015-06-28T07:37:48Z","body":"@lowjoel  sorry traveling now.\r\n\r\nquick thoughts from quick look at it before if i remember right:  only integer or do other numeric types have ranges to check?  no need to add new column to spec, why not use existing integer column?  add description to README."}}