Oracle Data Type: NCHAR

Description

Create table like so:

CREATE TABLE TESTNCHAR( NCHAR_NULL NCHAR NULL, NCHAR_NOTNULL NCHAR NOT NULL, NCHAR_DEFAULT NCHAR DEFAULT 1 , NCHAR_PK NCHAR , NCHAR_UNIQUE NCHAR , CONSTRAINT PK_NCHAR PRIMARY KEY (NCHAR_PK) , CONSTRAINT UN_NCHAR UNIQUE (NCHAR_UNIQUE) );

Snapshot is as follows:

<changeSet author="robert" id="1382988693362-10">
<createTable tableName="TESTNCHAR">
<column name="NCHAR_NULL" type="NCHAR2(1)"/>
<column name="NCHAR_NOTNULL" type="NCHAR2(1)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="1" name="NCHAR_DEFAULT" type="NCHAR2(1)"/>
<column name="NCHAR_PK" type="NCHAR2(1)">
<constraints nullable="false"/>
</column>
<column name="NCHAR_UNIQUE" type="NCHAR2(1)"/>
</createTable>
</changeSet>

Two issues:
1) Datatype returned as NCHAR2. Dunno if this is valid (like varchar --> varchar2).
2) getting sql error on deploy:

Migration failed for change set Changelog/changelog.xml::1382988622897-10::robert: Reason: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE DATATYPETEST.TESTNCHAR (NCHAR_NULL NCHAR2(1), NCHAR_NOTNULL NCHAR2(1) NOT NULL, NCHAR_DEFAULT NCHAR2(1) DEFAULT 1, NCHAR_PK NCHAR2(1) NOT NULL, NCHAR_UNIQUE NCHAR2(1)): ORA-00907: missing right parenthesis

Environment

Windows 8, Oracle

Status

Reporter

Kevin Chappell

Fix versions

Affects versions

Priority

Major
Configure