<p></p>
<p dir="auto">How to reproduce: put space before type.</p>
<div class="highlight highlight-source-diff" dir="auto"><pre class="notranslate"><span class="pl-md">--- a/lib/Schema/Result/Document.pm</span>
<span class="pl-mi1">+++ b/lib/Schema/Result/Document.pm</span>
<span class="pl-mdr">@@ -21,7 +21,7 @@</span> $X->add_columns(
                is_nullable => 1,
        },
        document_type_id => {
<span class="pl-md"><span class="pl-md">-</span>                data_type => 'integer',</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                data_type => ' integer',</span>
        },
        docn => {
                data_type => 'varchar',</pre></div>
<p dir="auto">Generated migration script (Notice extra space before integer for <code class="notranslate">document_type_id</code> column):</p>
<div class="highlight highlight-source-sql" dir="auto"><pre class="notranslate"><span class="pl-k">CREATE</span> <span class="pl-k">TABLE</span> "<span class="pl-en">document</span>" (
<span class="pl-s"><span class="pl-pds">"</span>id<span class="pl-pds">"</span></span> <span class="pl-k">serial</span> <span class="pl-k">NOT NULL</span>,
<span class="pl-s"><span class="pl-pds">"</span>owner_id<span class="pl-pds">"</span></span> <span class="pl-k">integer</span>,
<span class="pl-s"><span class="pl-pds">"</span>document_type_id<span class="pl-pds">"</span></span> <span class="pl-k">integer</span> <span class="pl-k">NOT NULL</span>,
<span class="pl-k">PRIMARY KEY</span> (<span class="pl-s"><span class="pl-pds">"</span>id<span class="pl-pds">"</span></span>)
);</pre></div>
<p dir="auto">I do not know how long this wrong data type lurking at production code. But we noticed it when started to use 'Mojolicious::Plugin::GraphQL', which issues <code class="notranslate">'document_type_id' unknown data type: integer</code> error.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/dbsrgits/sql-translator/issues/157">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AACJ4AVSMD6WNEXWSKD433DXADHVDANCNFSM6AAAAAAWXD7GZI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AACJ4ASCYAVGBT2EVSOJOHTXADHVDA5CNFSM6AAAAAAWXD7GZKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHGFZ5HCU.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><dbsrgits/sql-translator/issues/157</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/dbsrgits/sql-translator/issues/157",
"url": "https://github.com/dbsrgits/sql-translator/issues/157",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>