将sql转换为h2数据库的sql



如何通过h2数据库将sql转换为accepter?

alter table examination_order_details
add column is_duplicated boolean default false;
alter table medical_certificate
add column is_reissued boolean default false;
alter table medical_certificate
add column correction boolean default false;

alter table medical_certificate
add column harmful_factors character varying[];
alter table examination_order_details
add column sd_position_id integer;
alter table examination_order_details_history
add column sd_position_id integer;
alter table examination_order_details
add constraint examination_order_details_sd_position_id_fkey
foreign key (sd_position_id) references positions (id);
UPDATE public.examinations
SET is_valid = false
WHERE name_examination LIKE '%-23%'
create table dictionary_harmful_factors
(
id                       integer primary key generated always as identity,
name                     varchar not null,
printable_on_certificate boolean default false
);

insert into dictionary_harmful_factors (name, printable_on_certificate)
VALUES ('praca na wysokości', true),
('praca w torach czynnych', true),
('praca przy monitorze ekranowym powyżej 4h', false),
('kierowanie sam. osobowym do 3,5 t', true),
('kierowanie sam. osobowym do 3,5 t z przewozem osób', true),
('akcja zima', false);
  1. character varying[]需要替换为更符合SQL标准的character varying array(它不是完全兼容的,但H2也不需要varchar数据类型的长度(
  2. CCD_ 4需要替换为符合标准的CCD_

相关内容

  • 没有找到相关文章

最新更新