From b1884a094d2cedfbcc79ee29c66155ceda97095b Mon Sep 17 00:00:00 2001
From: mo khan <mo.khan@gmail.com>
Date: Sat, 11 Jan 2020 18:06:38 -0700
Subject: Insert data to test different test cases

---
 assignments/1/run.sql | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

(limited to 'assignments/1/run.sql')

diff --git a/assignments/1/run.sql b/assignments/1/run.sql
index d1ce2ea..16a57a7 100644
--- a/assignments/1/run.sql
+++ b/assignments/1/run.sql
@@ -32,3 +32,23 @@ ALTER TABLE projects ADD CONSTRAINT departments_fk FOREIGN KEY (department_id) R
 CREATE UNIQUE INDEX managers_idx on employees(department_id, manager) WHERE manager IS NULL;
 CREATE UNIQUE INDEX employee_office_idx on employees(office_number);
 CREATE UNIQUE INDEX employee_phone_idx on employees(phone_number);
+
+INSERT INTO departments VALUES (1, 1000.00);
+INSERT INTO departments VALUES (2, 2000.00);
+INSERT INTO departments VALUES (3, 2000.00);
+
+INSERT INTO projects VALUES (1, 1, 500.00);
+INSERT INTO projects VALUES (2, 1, 500.00);
+INSERT INTO projects VALUES (3, 3, 1000.00);
+
+INSERT INTO employees VALUES(1, 1, 1, '2019-01-01', 'manager', '+1-555-555-5555', '+1-777-777-7777', 'area 51', 50000.00, '1');
+INSERT INTO employees VALUES(2, 1, 1, '2019-01-01', 'engineer', '+1-555-555-0001', '+1-777-777-0001', 'area 51', 100000.00, NULL);
+
+-- duplicate phone number
+INSERT INTO employees VALUES(3, 1, 1, '2019-01-01', 'manager', '+1-555-555-5555', '+1-888-888-8888', 'area 51', 50002.00, '1');
+-- duplicate office number
+INSERT INTO employees VALUES(3, 1, 1, '2019-01-01', 'manager', '+1-666-666-6666', '+1-777-777-7777', 'area 51', 50003.00, '1');
+-- two managers for the same department
+INSERT INTO employees VALUES(3, 1, 1, '2019-01-01', 'manager', '+1-555-555-0002', '+1-777-777-0002', 'area 51', 50000.00, '1');
+
+SELECT * FROM employees;
-- 
cgit v1.2.3

