undef @size;
}
++ #
++ # Fixes ORA-00906: missing right parenthesis
++ # if size is 0 or undefined
++ #
++ for (qw/varchar2/) {
++ if ( $data_type =~ /^($_)$/i ) {
++ $size[0] ||= $max_size{$_};
++ }
++ }
++
$field_def .= " $data_type";
if ( defined $size[0] && $size[0] > 0 ) {
$field_def .= '(' . join( ',', @size ) . ')';
'CREATE TABLE Basic (
id number(10) NOT NULL,
title varchar2(100) DEFAULT \'hello\' NOT NULL,
- description varchar2(4000) DEFAULT \'\',
+ description clob DEFAULT \'\',
email varchar2(500),
-- explicitnulldef varchar2,
-- explicitemptystring varchar2 DEFAULT \'\',
-- emptytagdef varchar2 DEFAULT \'\',
++ explicitnulldef varchar2(4000),
++ explicitemptystring varchar2(4000) DEFAULT \'\',
++ emptytagdef varchar2(4000) DEFAULT \'\',
another_id number(10) DEFAULT \'2\',
timest date,
PRIMARY KEY (id),
CREATE TABLE Basic (
id number(10) NOT NULL,
title varchar2(100) DEFAULT 'hello' NOT NULL,
- description varchar2(4000) DEFAULT '',
+ description clob DEFAULT '',
email varchar2(500),
-- explicitnulldef varchar2,
-- explicitemptystring varchar2 DEFAULT '',
-- emptytagdef varchar2 DEFAULT '',
++ explicitnulldef varchar2(4000),
++ explicitemptystring varchar2(4000) DEFAULT '',
++ emptytagdef varchar2(4000) DEFAULT '',
another_id number(10) DEFAULT '2',
timest date,
PRIMARY KEY (id),
'CREATE TABLE "Basic" (
"id" number(10) NOT NULL,
"title" varchar2(100) DEFAULT \'hello\' NOT NULL,
- "description" varchar2(4000) DEFAULT \'\',
+ "description" clob DEFAULT \'\',
"email" varchar2(500),
-- "explicitnulldef" varchar2,
-- "explicitemptystring" varchar2 DEFAULT \'\',
-- "emptytagdef" varchar2 DEFAULT \'\',
++ "explicitnulldef" varchar2(4000),
++ "explicitemptystring" varchar2(4000) DEFAULT \'\',
++ "emptytagdef" varchar2(4000) DEFAULT \'\',
"another_id" number(10) DEFAULT \'2\',
"timest" date,
PRIMARY KEY ("id"),
CREATE TABLE "Basic" (
"id" number(10) NOT NULL,
"title" varchar2(100) DEFAULT 'hello' NOT NULL,
- "description" varchar2(4000) DEFAULT '',
+ "description" clob DEFAULT '',
"email" varchar2(500),
-- "explicitnulldef" varchar2,
-- "explicitemptystring" varchar2 DEFAULT '',
-- "emptytagdef" varchar2 DEFAULT '',
++ "explicitnulldef" varchar2(4000),
++ "explicitemptystring" varchar2(4000) DEFAULT '',
++ "emptytagdef" varchar2(4000) DEFAULT '',
"another_id" number(10) DEFAULT '2',
"timest" date,
PRIMARY KEY ("id"),
size:
- 0
name:
-- data_type: varchar2(10)
++ data_type: varchar2
default_value: ~
extra: {}
is_nullable: 0
name: name
order: 59
size:
-- - 0
++ - 10
other:
-- data_type: varchar2(10)
++ data_type: varchar2
default_value: ~
extra: {}
is_nullable: 1
name: other
order: 59
size:
-- - 0
++ - 10
name: d_operator
order: 11
size:
- 0
name:
-- data_type: nvarchar2(10)
++ data_type: nvarchar2
default_value: ~
extra: {}
is_nullable: 0
name: name
order: 59
size:
-- - 0
++ - 10
other:
-- data_type: nvarchar2(10)
++ data_type: nvarchar2
default_value: ~
extra: {}
is_nullable: 0
name: other
order: 59
size:
-- - 0
++ - 10
name: d_operator
order: 11
size:
- 0
name:
-- data_type: nvarchar2(10)
++ data_type: nvarchar2
default_value: ~
extra: {}
is_nullable: 0
name: name
order: 59
size:
-- - 0
++ - 10
foo:
-- data_type: nvarchar2(10)
++ data_type: nvarchar2
default_value: ~
extra: {}
is_nullable: 0
name: foo
order: 59
size:
-- - 0
++ - 10
other:
-- data_type: nvarchar2(10)
++ data_type: nvarchar2
default_value: ~
extra: {}
is_nullable: 0
name: other
order: 59
size:
-- - 0
++ - 10
name: d_operator
order: 11