{"action":"closed","issue":{"url":"https://api.github.com/repos/AnatolyUss/FromMySqlToPostgreSql/issues/19","labels_url":"https://api.github.com/repos/AnatolyUss/FromMySqlToPostgreSql/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/AnatolyUss/FromMySqlToPostgreSql/issues/19/comments","events_url":"https://api.github.com/repos/AnatolyUss/FromMySqlToPostgreSql/issues/19/events","html_url":"https://github.com/AnatolyUss/FromMySqlToPostgreSql/issues/19","id":120829756,"number":19,"title":"Missing default clauses","user":{"login":"djfogbr","id":16194807,"avatar_url":"https://avatars.githubusercontent.com/u/16194807?v=3","gravatar_id":"","url":"https://api.github.com/users/djfogbr","html_url":"https://github.com/djfogbr","followers_url":"https://api.github.com/users/djfogbr/followers","following_url":"https://api.github.com/users/djfogbr/following{/other_user}","gists_url":"https://api.github.com/users/djfogbr/gists{/gist_id}","starred_url":"https://api.github.com/users/djfogbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djfogbr/subscriptions","organizations_url":"https://api.github.com/users/djfogbr/orgs","repos_url":"https://api.github.com/users/djfogbr/repos","events_url":"https://api.github.com/users/djfogbr/events{/privacy}","received_events_url":"https://api.github.com/users/djfogbr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-07T17:46:59Z","updated_at":"2015-12-10T05:54:52Z","closed_at":"2015-12-10T05:54:52Z","body":"Hi,\r\n\r\nI'm trying to use FromMySqlToPostgreSql to migrate a zabbix database. The process mainly goes well, but I'm getting some erros like these:\r\n\r\nMessage: SQLSTATE[23502]: Not null violation: 7 ERROR:  column \"def_shortdata\" contains null values\r\n -- SQL: ALTER TABLE \"public\".\"actions\" ALTER COLUMN \"def_shortdata\" SET NOT NULL;\r\n\r\nThen I noticed that the \"default\" clauses are not exported/imported. For ex, the table \"condition\" in mysql is defined as:\r\n\r\nCREATE TABLE `conditions` (\r\n  `conditionid` bigint(20) unsigned NOT NULL,\r\n  `actionid` bigint(20) unsigned NOT NULL,\r\n  `conditiontype` int(11) NOT NULL DEFAULT '0',\r\n  `operator` int(11) NOT NULL DEFAULT '0',\r\n  `value` varchar(255) NOT NULL DEFAULT '',\r\n  PRIMARY KEY (`conditionid`),\r\n  KEY `conditions_1` (`actionid`),\r\n  CONSTRAINT `c_conditions_1` FOREIGN KEY (`actionid`) REFERENCES `actions` (`actionid`) ON DELETE CASCADE\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\r\n\r\nBut when exported to postgres, it is defined as:\r\n\r\nCREATE TABLE conditions\r\n(\r\n  conditionid numeric NOT NULL,\r\n  actionid numeric NOT NULL,\r\n  conditiontype integer NOT NULL,\r\n  operator integer NOT NULL,\r\n  value character varying(255),\r\n  CONSTRAINT conditions_pkey PRIMARY KEY (conditionid),\r\n  CONSTRAINT conditions_actionid_fkey FOREIGN KEY (actionid)\r\n      REFERENCES actions (actionid) MATCH SIMPLE\r\n      ON UPDATE RESTRICT ON DELETE CASCADE\r\n)\r\n\r\nAny help?\r\n\r\nThanks in advance."}}