mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
Add testcase, that uses all kinds of reserved keywords
This commit is contained in:
1 parent
4077d906d1
commit
04d2a20945
93 files changed
+1129
-64
No files matched your search
@@ -137,6 +137,16 @@ create table migtest_e_softdelete (
|
||||
constraint pk_migtest_e_softdelete primary key (id)
|
||||
);
|
||||
|
||||
create table "table" (
|
||||
"index" varchar(255) not null,
|
||||
"from" varchar(255),
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
constraint pk_table primary key ("index")
|
||||
);
|
||||
comment on column "table"."index" is 'this is a comment';
|
||||
|
||||
create table migtest_mtm_c (
|
||||
id integer generated by default as identity not null,
|
||||
name varchar(255),
|
||||
@@ -162,6 +172,10 @@ create table migtest_oto_master (
|
||||
);
|
||||
|
||||
-- apply alter tables
|
||||
alter table "table" add column sys_period_start timestamp(12) not null generated always as row begin;
|
||||
alter table "table" add column sys_period_end timestamp(12) not null generated always as row end;
|
||||
alter table "table" add column sys_period_txn timestamp(12) generated always as transaction start id;
|
||||
alter table "table" add period system_time (sys_period_start,sys_period_end);
|
||||
alter table migtest_e_history2 add column sys_period_start timestamp(12) not null generated always as row begin;
|
||||
alter table migtest_e_history2 add column sys_period_end timestamp(12) not null generated always as row end;
|
||||
alter table migtest_e_history2 add column sys_period_txn timestamp(12) generated always as transaction start id;
|
||||
@@ -196,6 +210,10 @@ alter table migtest_e_history5 add versioning use history table migtest_e_histor
|
||||
create table migtest_e_history6_history as (select * from migtest_e_history6) with no data;
|
||||
alter table migtest_e_history6 add versioning use history table migtest_e_history6_history;
|
||||
alter table migtest_e_ref add constraint uq_migtest_e_ref_name unique (name);
|
||||
create unique index uq_table_to on "table"("to") exclude null keys;
|
||||
create unique index uq_table_varchar on "table"("varchar") exclude null keys;
|
||||
create table table_history as (select * from "table") with no data;
|
||||
alter table "table" add versioning use history table table_history;
|
||||
-- foreign keys and indices
|
||||
create index ix_migtest_fk_cascade_one_id on migtest_fk_cascade (one_id);
|
||||
alter table migtest_fk_cascade add constraint fk_migtest_fk_cascade_one_id foreign key (one_id) references migtest_fk_cascade_one (id) on delete cascade on update restrict;
|
||||
@@ -206,5 +224,9 @@ alter table migtest_fk_set_null add constraint fk_migtest_fk_set_null_one_id for
|
||||
create index ix_migtest_e_basic_eref_id on migtest_e_basic (eref_id);
|
||||
alter table migtest_e_basic add constraint fk_migtest_e_basic_eref_id foreign key (eref_id) references migtest_e_ref (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_table_foreign on "table" ("foreign");
|
||||
alter table "table" add constraint fk_table_foreign foreign key ("foreign") references "table" ("index") on delete restrict on update restrict;
|
||||
|
||||
create index ix_migtest_e_basic_indextest1 on migtest_e_basic (indextest1);
|
||||
create index ix_migtest_e_basic_indextest5 on migtest_e_basic (indextest5);
|
||||
create index ix_table_from on "table" ("from");
|
||||
Reference in new issue
Block a user