oracle / quicksql

A library for generating DDL SQL and entity-relationship-diagrams from Quick SQL code
Universal Permissive License v1.0
53 stars 11 forks source link

Certain check constraint values can change column data type #49

Closed dmcghan closed 9 months ago

dmcghan commented 9 months ago

The following Quick SQL:

change_history
  data_type vc20 /check VARCHAR2,CLOB,TSWLTZ

Generates this SQL:

create table change_history (
    id           number generated by default on null as identity
                 constraint change_history_id_pk primary key,
    data_type    timestamp with local time zone constraint change_history_data_type_ck
                 check (data_type in ('VARCHAR2','CLOB','TSWLTZ'))
);

Note that data_type is a timestamp with local time zone, not a varchar2(20) as defined.

vadim-tropashko commented 9 months ago

1.2.1