loopbackio / loopback-connector-oracle

Connect Loopback to Oracle
http://loopback.io/doc/en/lb3/Oracle-connector.html
Other
28 stars 30 forks source link

Allow CLOB/BLOB data types for migration #192

Closed ataft closed 4 years ago

ataft commented 4 years ago

There's currently no way to create a CLOB data type. I would expect that type of "Object" or "JSON" would default to CLOB since Oracle varchar2's are only 4,000 characters by default in STANDARD mode. At this point, changing the code would break things, so this PR is a "no-brainer" that couldn't possibly break anything. Basically you would just set columnMetadata for Oracle, like this:

"props": {
  "type": "object",
  "required": false,
  "length": "MAX",
  "oracle": {
    "dataType": "CLOB" 
  }
},

The main problem with the current code is that CLOB's have no defined dataLength, but props.length needs to be defined for other databases, this this line is a problem and thus requires this PR.

slnode commented 4 years ago

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."