{"action":"created","issue":{"url":"https://api.github.com/repos/jOOQ/jOOQ/issues/4841","labels_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/4841/labels{/name}","comments_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/4841/comments","events_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/4841/events","html_url":"https://github.com/jOOQ/jOOQ/issues/4841","id":123513627,"number":4841,"title":"Capture default values during code generation","user":{"login":"dbarbato","id":12414710,"avatar_url":"https://avatars.githubusercontent.com/u/12414710?v=3","gravatar_id":"","url":"https://api.github.com/users/dbarbato","html_url":"https://github.com/dbarbato","followers_url":"https://api.github.com/users/dbarbato/followers","following_url":"https://api.github.com/users/dbarbato/following{/other_user}","gists_url":"https://api.github.com/users/dbarbato/gists{/gist_id}","starred_url":"https://api.github.com/users/dbarbato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbarbato/subscriptions","organizations_url":"https://api.github.com/users/dbarbato/orgs","repos_url":"https://api.github.com/users/dbarbato/repos","events_url":"https://api.github.com/users/dbarbato/events{/privacy}","received_events_url":"https://api.github.com/users/dbarbato/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jOOQ/jOOQ/labels/C:%20Code%20Generation","name":"C: Code Generation","color":"0000aa"},{"url":"https://api.github.com/repos/jOOQ/jOOQ/labels/C:%20DB:%20H2","name":"C: DB: H2","color":"0000aa"},{"url":"https://api.github.com/repos/jOOQ/jOOQ/labels/P:%20Medium","name":"P: Medium","color":"ffaaaa"},{"url":"https://api.github.com/repos/jOOQ/jOOQ/labels/T:%20Support%20request","name":"T: Support request","color":"cccccc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jOOQ/jOOQ/milestones/119","html_url":"https://github.com/jOOQ/jOOQ/milestones/Version%203.8.0","labels_url":"https://api.github.com/repos/jOOQ/jOOQ/milestones/119/labels","id":1094772,"number":119,"title":"Version 3.8.0","description":"","creator":{"login":"lukaseder","id":734593,"avatar_url":"https://avatars.githubusercontent.com/u/734593?v=3","gravatar_id":"","url":"https://api.github.com/users/lukaseder","html_url":"https://github.com/lukaseder","followers_url":"https://api.github.com/users/lukaseder/followers","following_url":"https://api.github.com/users/lukaseder/following{/other_user}","gists_url":"https://api.github.com/users/lukaseder/gists{/gist_id}","starred_url":"https://api.github.com/users/lukaseder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukaseder/subscriptions","organizations_url":"https://api.github.com/users/lukaseder/orgs","repos_url":"https://api.github.com/users/lukaseder/repos","events_url":"https://api.github.com/users/lukaseder/events{/privacy}","received_events_url":"https://api.github.com/users/lukaseder/received_events","type":"User","site_admin":false},"open_issues":355,"closed_issues":105,"state":"open","created_at":"2015-05-04T10:29:41Z","updated_at":"2015-12-23T09:28:36Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-12-22T16:31:48Z","updated_at":"2015-12-23T09:35:45Z","closed_at":null,"body":"As a part of unit and integration testing, we're using jooq to recreate our database in H2. To do this we're leveraging the DefaultSchema and jooq generated objects.\r\n\r\nThe original database has default values on several columns, those columns are also not nullable. There currently doesn't appear to be a way to  capture the default values during the object generation phase.\r\n\r\nWe've looked through the documentation and can't see anything to enable this functionality. Have we missed something or would this be a feature request? If this is a feature request, is there a workaround we could use in the mean time?\r\n\r\nMany thanks"},"comment":{"url":"https://api.github.com/repos/jOOQ/jOOQ/issues/comments/166845245","html_url":"https://github.com/jOOQ/jOOQ/issues/4841#issuecomment-166845245","issue_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/4841","id":166845245,"user":{"login":"lukaseder","id":734593,"avatar_url":"https://avatars.githubusercontent.com/u/734593?v=3","gravatar_id":"","url":"https://api.github.com/users/lukaseder","html_url":"https://github.com/lukaseder","followers_url":"https://api.github.com/users/lukaseder/followers","following_url":"https://api.github.com/users/lukaseder/following{/other_user}","gists_url":"https://api.github.com/users/lukaseder/gists{/gist_id}","starred_url":"https://api.github.com/users/lukaseder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukaseder/subscriptions","organizations_url":"https://api.github.com/users/lukaseder/orgs","repos_url":"https://api.github.com/users/lukaseder/repos","events_url":"https://api.github.com/users/lukaseder/events{/privacy}","received_events_url":"https://api.github.com/users/lukaseder/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T09:35:45Z","updated_at":"2015-12-23T09:35:45Z","body":"Hmm, our integration tests don't indicate that DDL run against MySQL is much much slower than DDL run against H2 - but it's up to you. There's always a tradeoff between correctness and performance... Perhaps you'll find a way to auto-generate equivalent DDL, although from my experience, it's often good to do some of these things manually.\r\n\r\nUnfortunately, jOOQ really currently doesn't support custom `DEFAULT` clauses in DDL, neither when reading meta data, nor when creating it. See also #3852"}}