Skip to content

Commit

Permalink
fix binary col oracle type
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierCavadenti committed Dec 14, 2021
1 parent bb79f68 commit f38e57c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/dialects/oracledb/schema/oracledb-columncompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ class ColumnCompiler_Oracledb extends ColumnCompiler_Oracle {
}

ColumnCompiler_Oracledb.prototype.time = 'timestamp with local time zone';
ColumnCompiler_Oracledb.prototype.uuid = ({ useBinaryUuid = false } = {}) =>
useBinaryUuid ? 'raw(16)' : 'char(36)';

module.exports = ColumnCompiler_Oracledb;
2 changes: 1 addition & 1 deletion test/integration2/query/misc/additional.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ describe('Additional', function () {
expect(uuid).to.equal(originalUuid);
});

it('should insert binary uuid and retreive it', async () => {
it('should insert binary uuid and retrieve it', async () => {
await knex.schema.dropTableIfExists('uuid_table');
await knex.schema.createTable('uuid_table', (t) => {
t.uuid('uuid_col_binary', { useBinaryUuid: true });
Expand Down

0 comments on commit f38e57c

Please sign in to comment.