From e12c4e1153e9a5505fafce678ed29d6cb4304ae1 Mon Sep 17 00:00:00 2001 From: zotov Date: Wed, 20 Apr 2022 18:22:13 +0300 Subject: [PATCH] Added .sql which will replace 'gtcs-ref-integ.sql' after all tests will be re-implemented: ID values must be of numeric type rather than strange char(3) that was taken from employee standard DB. --- files/gtcs-ref-integ-init.sql | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 files/gtcs-ref-integ-init.sql diff --git a/files/gtcs-ref-integ-init.sql b/files/gtcs-ref-integ-init.sql new file mode 100644 index 00000000..886a8b21 --- /dev/null +++ b/files/gtcs-ref-integ-init.sql @@ -0,0 +1,31 @@ +set bail on; +create domain dm_emp_id smallint; +create domain dm_dep_id smallint; +create domain dm_name varchar(20); + +create table department ( + dept_no dm_dep_id not null, + dept_name dm_name not null, + constraint dept_key primary key (dept_no) +); + +create table employee ( + emp_no dm_emp_id not null, + last_name dm_name not null, + dept_no dm_dep_id not null constraint ref_key references department(dept_no), + constraint emp_key primary key (emp_no) +); +commit; +insert into department( dept_no, dept_name) values (1, 'd1'); +insert into department( dept_no, dept_name) values (2, 'd2'); +insert into department( dept_no, dept_name) values (3, 'd3'); +insert into employee( emp_no, last_name, dept_no) values (1, 'e1', 1); +insert into employee( emp_no, last_name, dept_no) values (2, 'e2', 2); +insert into employee( emp_no, last_name, dept_no) values (3, 'e3', 3); +insert into employee( emp_no, last_name, dept_no) values (4, 'e4', 1); +insert into employee( emp_no, last_name, dept_no) values (5, 'e5', 1); +insert into employee( emp_no, last_name, dept_no) values (6, 'e6', 1); +insert into employee( emp_no, last_name, dept_no) values (7, 'e7', 2); +insert into employee( emp_no, last_name, dept_no) values (8, 'e8', 3); +insert into employee( emp_no, last_name, dept_no) values (9, 'e9', 3); +commit;