{"action":"created","issue":{"url":"https://api.github.com/repos/maxlapshin/mysql2postgres/issues/12","repository_url":"https://api.github.com/repos/maxlapshin/mysql2postgres","labels_url":"https://api.github.com/repos/maxlapshin/mysql2postgres/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/maxlapshin/mysql2postgres/issues/12/comments","events_url":"https://api.github.com/repos/maxlapshin/mysql2postgres/issues/12/events","html_url":"https://github.com/maxlapshin/mysql2postgres/issues/12","id":234153,"number":12,"title":"unknown \"float(x,y)\" and \"set('s1','s2',...)\"","user":{"login":"anthalamus","id":317675,"avatar_url":"https://avatars.githubusercontent.com/u/317675?v=3","gravatar_id":"","url":"https://api.github.com/users/anthalamus","html_url":"https://github.com/anthalamus","followers_url":"https://api.github.com/users/anthalamus/followers","following_url":"https://api.github.com/users/anthalamus/following{/other_user}","gists_url":"https://api.github.com/users/anthalamus/gists{/gist_id}","starred_url":"https://api.github.com/users/anthalamus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthalamus/subscriptions","organizations_url":"https://api.github.com/users/anthalamus/orgs","repos_url":"https://api.github.com/users/anthalamus/repos","events_url":"https://api.github.com/users/anthalamus/events{/privacy}","received_events_url":"https://api.github.com/users/anthalamus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/maxlapshin/mysql2postgres/labels/bug","name":"bug","color":"b60205"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2010-06-29T18:17:21Z","updated_at":"2016-08-21T09:11:09Z","closed_at":"2016-08-21T09:11:09Z","body":"I got 3 types of errors when running the script on my data. Here are the descriptions:\n\n    =========================\n    1. float(x,y):\n    \n    error message:\n    Unknown {:auto_increment=>false, :type=>\"float(10,5)\", :length=>10, :table_name=>\"trubripes_gene_ensembl__homolog_Mdom__dm\", :decimals=>\"5\", :null=>true, :name=>\"dn_4014\", :primary_key=>false}\n    \n    mysql:\n    `dn_4014` float(10,5) DEFAULT NULL,\n    --------------------------------------\n    2. set('x',...):\n    \n    error message:\n    Unknown {:auto_increment=>false, :type=>\"set('SOFA','biosapiens','gosubset_prok','goslim_candida','goslim_generic','goslim_goa','goslim_pir','goslim_plant','goslim_pombe','goslim_yeast')\", :length=>40, :table_name=>\"acarolinensis_gene_ensembl__go_biological_process__dm\", :decimals=>nil, :null=>true, :name=>\"subsets_1006\", :primary_key=>false}\n    \n    mysql:\n    `subsets_1006` set('SOFA','biosapiens','gosubset_prok','goslim_candida','goslim_generic','goslim_goa','goslim_pir','goslim_plant','goslim_pombe','goslim_yeast') DEFAULT NULL,\n    --------------------------------------\n    3. set('x',...):\n    \n    error message:\n    Unknown {:auto_increment=>false, :type=>\"set('ESSENTIAL_SPLICE_SITE','STOP_GAINED','STOP_LOST','COMPLEX_INDEL','FRAMESHIFT_CODING','NON_SYNONYMOUS_CODING','SPLICE_SITE','PARTIAL_CODON','SYNONYMOUS_CODING','REGULATORY_REGION','WITHIN_MATURE_miRNA','5PRIME_UTR','3PRIME_UTR','INTRONIC','NMD_TRANSCRIPT','UPSTREAM','DOWNSTREAM','WITHIN_NON_CODING_GENE','NO_CONSEQUENCE','INTERGENIC')\", :length=>4, :table_name=>\"btaurus_gene_ensembl__transcript_variation__dm\", :decimals=>nil, :null=>true, :name=>\"consequence_type_2026\", :default=>\"INTERGENIC\", :primary_key=>false}\n    \n    mysql:\n    `consequence_type_2026` set('ESSENTIAL_SPLICE_SITE','STOP_GAINED','STOP_LOST','COMPLEX_INDEL','FRAMESHIFT_CODING','NON_SYNONYMOUS_CODING','SPLICE_SITE','PARTIAL_CODON','SYNONYMOUS_CODING','REGULATORY_REGION','WITHIN_MATURE_miRNA','5PRIME_UTR','3PRIME_UTR','INTRONIC','NMD_TRANSCRIPT','UPSTREAM','DOWNSTREAM','WITHIN_NON_CODING_GENE','NO_CONSEQUENCE','INTERGENIC') DEFAULT 'INTERGENIC',  `\n    --------------------------------------\n\n(very) quick (and ugly yet working) fix, add lines:\n\n\t    when \"float(10,5)\"\n\t      default = \" DEFAULT #{column[:default].nil? ? 'NULL' : column[:default].to_f}\" if default\n\t      \"real\"\n\t    when \"set('SOFA','biosapiens','gosubset_prok','goslim_candida','goslim_generic','goslim_goa','goslim_pir','goslim_plant','goslim_pombe','goslim_yeast')\"\n\t      default = default + \"::character varying\" if default\n\t      \"character varying(#{column[:length]})\"      \n\t    when \"set('ESSENTIAL_SPLICE_SITE','STOP_GAINED','STOP_LOST','COMPLEX_INDEL','FRAMESHIFT_CODING','NON_SYNONYMOUS_CODING','SPLICE_SITE','PARTIAL_CODON','SYNONYMOUS_CODING','REGULATORY_REGION','WITHIN_MATURE_miRNA','5PRIME_UTR','3PRIME_UTR','INTRONIC','NMD_TRANSCRIPT','UPSTREAM','DOWNSTREAM','WITHIN_NON_CODING_GENE','NO_CONSEQUENCE','INTERGENIC')\"\n\t      default = default + \"::character varying\" if default\n\t      \"character varying(#{column[:length]})\"\n\n----------------------------------------\nObviously the above quick fix only works for my data, however I guess someone in desperate need of a quick fix could reuse the idea.\n\nBeing a complete ignorant in ruby, I will leave it to the experts to come up with a proper fix (with \"starts_with\" or regex I suppose)!"},"comment":{"url":"https://api.github.com/repos/maxlapshin/mysql2postgres/issues/comments/241246839","html_url":"https://github.com/maxlapshin/mysql2postgres/issues/12#issuecomment-241246839","issue_url":"https://api.github.com/repos/maxlapshin/mysql2postgres/issues/12","id":241246839,"user":{"login":"paazmaya","id":369881,"avatar_url":"https://avatars.githubusercontent.com/u/369881?v=3","gravatar_id":"","url":"https://api.github.com/users/paazmaya","html_url":"https://github.com/paazmaya","followers_url":"https://api.github.com/users/paazmaya/followers","following_url":"https://api.github.com/users/paazmaya/following{/other_user}","gists_url":"https://api.github.com/users/paazmaya/gists{/gist_id}","starred_url":"https://api.github.com/users/paazmaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paazmaya/subscriptions","organizations_url":"https://api.github.com/users/paazmaya/orgs","repos_url":"https://api.github.com/users/paazmaya/repos","events_url":"https://api.github.com/users/paazmaya/events{/privacy}","received_events_url":"https://api.github.com/users/paazmaya/received_events","type":"User","site_admin":false},"created_at":"2016-08-21T09:11:09Z","updated_at":"2016-08-21T09:11:09Z","body":"Closing as an old issue, that would seem to be out of date.\r\nFeel free to re-open and update with comments against the `master` branch."}}
{"actor":{"display_login":"paazmaya"}}