CakeDC / cakephp-oracle-driver

CakePHP 3 Driver for Oracle Database
Other
40 stars 25 forks source link

Triple quote on default value #26

Closed enmacc closed 2 years ago

enmacc commented 6 years ago

I have a table with some default value, when I generated DDL with sql developer i get this:

CREATE TABLE "CLA"."SOL_BANDO" ( "ID_BANDO" NUMBER, "COD_TIPO_BANDO" VARCHAR2(20 BYTE), "DESCRIZIONE" VARCHAR2(500 BYTE), "NOTE" VARCHAR2(4000 BYTE), "DATA_APERTURA" DATE, "DATA_CHIUSURA" DATE, "ANNO" NUMBER, "LINK_BANDO" VARCHAR2(500 BYTE), "FLAG_SOSPESO" CHAR(1 BYTE) DEFAULT 'N',

The driver with createSql write

CREATE TABLE SOL_BANDO ( id_bando NUMBER NOT NULL, cod_tipo_bando VARCHAR2(20) DEFAULT NULL, descrizione VARCHAR2(500) DEFAULT NULL, note VARCHAR2(4000) DEFAULT NULL, data_apertura TIMESTAMP DEFAULT NULL, data_chiusura TIMESTAMP DEFAULT NULL, anno NUMBER DEFAULT NULL, link_bando VARCHAR2(500) DEFAULT NULL, flag_sospeso VARCHAR2(1) DEFAULT '''N''',

Look at default value generated

Above "FLAG_SOSPESO" CHAR(1 BYTE) DEFAULT 'N', Bottom flag_sospeso VARCHAR2(1) DEFAULT '''N''',

when this code is excute i get an oracle error

`Report error - Errore SQL: ORA-01401: valore inserito troppo grande per la colonna

  1. 00000 - "inserted value too large for column" Cause: The value inserted was too large for the given column. Action: Do not insert a value greater than what the column can hold.`

There is a way to overdue this? About the number of single quote generated around default value, maybe with some configuration parameters?

Thanks in advance

Sorry for my poor English

skie commented 4 years ago

how oracle driver was configured. does it reproduced on lastest fix?

skie commented 2 years ago

closed becasue of no response