{"action":"created","issue":{"url":"https://api.github.com/repos/AnatolyUss/nmig/issues/39","repository_url":"https://api.github.com/repos/AnatolyUss/nmig","labels_url":"https://api.github.com/repos/AnatolyUss/nmig/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/AnatolyUss/nmig/issues/39/comments","events_url":"https://api.github.com/repos/AnatolyUss/nmig/issues/39/events","html_url":"https://github.com/AnatolyUss/nmig/issues/39","id":189856461,"number":39,"title":"Migration differences","user":{"login":"tobymurray-nanometrics","id":16090989,"avatar_url":"https://avatars.githubusercontent.com/u/16090989?v=3","gravatar_id":"","url":"https://api.github.com/users/tobymurray-nanometrics","html_url":"https://github.com/tobymurray-nanometrics","followers_url":"https://api.github.com/users/tobymurray-nanometrics/followers","following_url":"https://api.github.com/users/tobymurray-nanometrics/following{/other_user}","gists_url":"https://api.github.com/users/tobymurray-nanometrics/gists{/gist_id}","starred_url":"https://api.github.com/users/tobymurray-nanometrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobymurray-nanometrics/subscriptions","organizations_url":"https://api.github.com/users/tobymurray-nanometrics/orgs","repos_url":"https://api.github.com/users/tobymurray-nanometrics/repos","events_url":"https://api.github.com/users/tobymurray-nanometrics/events{/privacy}","received_events_url":"https://api.github.com/users/tobymurray-nanometrics/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-16T21:46:08Z","updated_at":"2016-11-20T21:13:27Z","closed_at":null,"body":"I'll use this as a catch-all for my observations, I can break them out if you'd rather.\r\n\r\nUsing NMIG off d88d364\r\nPostgreSQL Server 9.5.4 (I know the main page says 9.3 is supported)\r\nMySQL 5.6.16-1~exp1\r\n\r\nIf the issue is the PostgreSQL version I can retry, I'm hoping that it isn't... \r\n\r\nI dumped the MySQL schema, I dumped a native PostgreSQL schema, and I dumped the schema from a MySQL -> PostgreSQL migrated result. I then compared the native PostgreSQL schema with the migrated schema with [apgdiff](http://www.apgdiff.com/). The following differences exist:\r\n\r\n#### Indices are renamed\r\nE.g.\r\nIn MySQL: `KEY `associations_origin_id_idx` (`origin_id`),`\r\nIn native PostgreSQL: `associations_origin_id_idx`\r\nIn migrated schema: `public_associations_origin_id0_idx`\r\n\r\n#### Tinyint not converted to boolean\r\nAddressed in #13 - I made the changes you suggested in the discussion (after verifying all my `tinyint`s were booleans) and it worked and preserved the values. Would be marginally nicer to have a more accessible configuration, but that's getting picky. A toggle that would allow assuming all `tinyint(1)` are boolean would work for us.\r\n\r\n#### Boolean default values are not preserved\r\nE.g.\r\nIn MySQL: `is_time_defined` tinyint(1) DEFAULT '0'\r\nIn native PostgreSQL: `is_time_defined boolean DEFAULT false`\r\nIn migrated schema: `is_time_defined boolean`\r\n\r\n#### String default values are not preserved\r\nE.g.\r\nIn MySQL: 'channel_code` varchar(3) DEFAULT '','\r\nIn native PostgreSQL: 'channel_code character varying(3) DEFAULT ''::character varying,'\r\nIn migrated schema: 'channel_code character varying(3)'\r\n\r\nOther than that, the migration went smoothly and the output is relatively easily corrected. Any configuration options I might be missing to address the above mentioned discrepancies? The only thing (besides #13) that I changed was the `config.json`. Let me know if I can provide any more information to help flesh this out. \r\n\r\nThanks a lot for this tool!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/AnatolyUss/nmig/issues/comments/261806186","html_url":"https://github.com/AnatolyUss/nmig/issues/39#issuecomment-261806186","issue_url":"https://api.github.com/repos/AnatolyUss/nmig/issues/39","id":261806186,"user":{"login":"AnatolyUss","id":13574071,"avatar_url":"https://avatars.githubusercontent.com/u/13574071?v=3","gravatar_id":"","url":"https://api.github.com/users/AnatolyUss","html_url":"https://github.com/AnatolyUss","followers_url":"https://api.github.com/users/AnatolyUss/followers","following_url":"https://api.github.com/users/AnatolyUss/following{/other_user}","gists_url":"https://api.github.com/users/AnatolyUss/gists{/gist_id}","starred_url":"https://api.github.com/users/AnatolyUss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnatolyUss/subscriptions","organizations_url":"https://api.github.com/users/AnatolyUss/orgs","repos_url":"https://api.github.com/users/AnatolyUss/repos","events_url":"https://api.github.com/users/AnatolyUss/events{/privacy}","received_events_url":"https://api.github.com/users/AnatolyUss/received_events","type":"User","site_admin":false},"created_at":"2016-11-20T21:13:27Z","updated_at":"2016-11-20T21:13:27Z","body":"Hello, and sorry for the late response.\r\n\r\nThe motivation to create indexes with an {integer} part is to prevent  naming collisions, that possible in case of compound indexes.\r\n\r\nRegarding default values for boolean columns - there is  the DataTypesMap.json, which is the configuration file for data types mapping. I don't like an idea to treat tinyint in some different way (in config.json).\r\nI realize, that there is a problem, and I'll think how to improve default values processing.\r\n\r\nThanks a lot for your feedback!\r\n"}}
{"actor":{"display_login":"AnatolyUss"}}