Permalink
Browse files

Latest (final) database changes from Grace

Makes case visit miles and hours columns into floats.
  • Loading branch information...
1 parent 91a3fa1 commit 516dee5637449009fabc02aa346841fc873cc17b @bcat committed May 29, 2012
Showing with 10 additions and 15 deletions.
  1. +5 −7 SVDP_Database.sql
  2. +5 −8 Test_Data_Insert.sql
View
@@ -49,7 +49,7 @@ CREATE TABLE client(
birthdate DATE,
ssn4 INT,
cell_phone CHAR(10),
- home_phone CHAR(10),
+ home_phone CHAR(10),
work_phone CHAR(10),
created_date DATE,
member_parish VARCHAR(50),
@@ -104,7 +104,7 @@ CREATE TABLE employment(
end_date DATE,
PRIMARY KEY (employment_id),
FOREIGN KEY (client_id) REFERENCES client(client_id)
-) ENGINE = InnoDB;
+) ENGINE = InnoDB;
CREATE TABLE client_comment(
@@ -124,7 +124,7 @@ CREATE TABLE client_case(
household_id INT,
opened_user_id VARCHAR(30),
opened_date DATE,
- status VARCHAR(10),
+ status VARCHAR(10),
PRIMARY KEY (case_id),
FOREIGN KEY (household_id) REFERENCES household(household_id),
FOREIGN KEY (opened_user_id) REFERENCES user(user_id)
@@ -134,8 +134,8 @@ CREATE TABLE case_visit(
visit_id INT NOT NULL AUTO_INCREMENT,
case_id INT,
visit_date DATE,
- miles INT,
- hours INT,
+ miles DECIMAL(3,2),
+ hours DECIMAL(3,2),
PRIMARY KEY (visit_id),
FOREIGN KEY (case_id) REFERENCES client_case(case_id)
) ENGINE = InnoDB;
@@ -240,5 +240,3 @@ CREATE TABLE documents(
internal_flag TINYINT(1),
PRIMARY KEY (doc_id)
) ENGINE = InnoDB;
-
-
View
@@ -1,5 +1,4 @@
-
-INSERT INTO user VALUES
+INSERT INTO user VALUES
("asmith", "abc12345", "Addy", "Smith", "asmith@123.com", 1231231234, 1231231234, 'M', 0, 1),
("badams", "abc12345", "Ben", "Adams", "badams@123.com", 1231231234, 1231231234, 'M', 0, 1),
("jcombs", "abc12345", "Julie", "Combs", "jcombs@123.com", 1231231234, 1231231234, 'M', 0, 1),
@@ -16,7 +15,7 @@ update user set password=sha2('tIHn1G$0 d1F5r 3tyHW33 tnR1uN5jt@ L@8abc12345', 2
update user set password=sha2('tIHn1G$0 d1F5r 3tyHW33 tnR1uN5jt@ L@8abc12345', 256) where user_id="cpassword";
-INSERT INTO client VALUES
+INSERT INTO client VALUES
(NULL, "badams", "John", "Doe", NULL, "Married", '1968-12-12', 1111, 1231231235, 1231231236, 1231231237, '2008-12-12', "St. Raphael", 1),
(NULL, "badams", "Kathy", "Doe", NULL, "Married", '1968-1-1', 1114, 1231231235, 1231231236, 1231231237, '2008-12-12', "St. Raphael", 0),
(NULL, "asmith", "Mary", "Stevens", "Jane", "Single", '1968-1-13', 1112, 1231231238, 1231231239, 1231231240, '2006-7-12', "SS. Peter & Paul", 0),
@@ -64,8 +63,8 @@ INSERT INTO client_case VALUES
(NULL, 4, "asmith", '2010-3-8', "Closed");
INSERT INTO case_visit VALUES
-(NULL, 1, '2008-12-22', 9, 3),
-(NULL, 2, '2010-3-20', 3, 4);
+(NULL, 1, '2008-12-22', 9.2, 3.3),
+(NULL, 2, '2010-3-20', 3.9, 4.5);
INSERT INTO case_visitors VALUES
(1, "badams"),
@@ -81,7 +80,7 @@ INSERT INTO case_need VALUES
(NULL, 2, "Food", 100.00);
INSERT INTO check_request VALUES
-(NULL, 1, "badams", '2009-1-9', 100.00, "Please write this check quickly.", "jcombs", NULL, '2009-1-18', "D", "1370498509384", "Lener Apts", "123 abc street", "naperville", 'IL', '60560', 1231237890, "John", "Lener"),
+(NULL, 1, "badams", '2009-1-9', 100.00, "Please write this check quickly.", "jcombs", NULL, 2009-1-18', "D", "1370498509384", "Lener Apts", "123 abc street", "naperville", 'IL', '60560', 1231237890, "John", "Lener"),
(NULL, 1, "badams", '2009-1-9', 1000.00, "Please write this check quickly.", "jcombs", "7321", '2009-1-18', "I", "1370498509384", "Lener Apts", "123 abc street", "naperville", 'IL', '60560', 1231237890, "John", "Lener"),
(NULL, 2, "asmith", '2010-3-25', 750.00, "Please write this check quickly.", null, null, null, "P","1370498509384", "Toyota", "123 abc street", "naperville", 'IL', '60560', 1231237890, "Mike", "Young");
@@ -100,5 +99,3 @@ INSERT INTO schedule VALUES
(3, '2012-3-14', "jcombs"),
(4, '2012-3-21', "asmith"),
(5, '2012-3-28', "badams");
-
-

0 comments on commit 516dee5

Please sign in to comment.