Database Creation

Backend database work, updated and improved from the Prototype branch. The database schema includes most of the changes Steve had in the Google doc, we should try to come to a consensus with this merge.

As for testing I've some manually testing as well as verifying the following results after each change (probably not needed, but I do have the script for this):

kjh65@ws81:~/public_html/WAVED/databaseCreation$ bash -x ~/test.sh
+ URL=https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP/
+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//getProjectList.php
[]+ echo

+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//setProjectState.php -X POST -d project=testProject1 -d state=testState1
+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//setProjectState.php -X POST -d project=testProject2 -d state=testState2
+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//setProjectState.php -X POST -d project=testProject3 -d state=testState3
+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//getProjectList.php
["testProject1","testProject2","testProject3"]+ echo

+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//getProjectState.php -X GET -Gd project=testProject1
testState1+ echo

+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//getProjectState.php -X GET -Gd project=testProject2
testState2+ echo

+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//getProjectState.php -X GET -Gd project=testProject3
testState3+ echo

+ sqlite3 DB/waved.db 'SELECT * FROM project;'
1|testProject1|testState1|1390766914|1|1390766914|1
2|testProject2|testState2|1390766914|1|1390766914|1
3|testProject3|testState3|1390766915|1|1390766915|1
+ sleep 2
+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//setProjectState.php -X POST -d project=testProject1 -d state=testNewState1
+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//setProjectState.php -X POST -d project=testProject2 -d state=testNewState2
+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//setProjectState.php -X POST -d project=testProject3 -d state=testNewState3
+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//getProjectList.php
["testProject1","testProject2","testProject3"]+ echo

+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//getProjectState.php -X GET -Gd project=testProject1
testNewState1+ echo

+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//getProjectState.php -X GET -Gd project=testProject2
testNewState2+ echo

+ curl https://www.cs.drexel.edu/~kjh65/WAVED/databaseCreation/PHP//getProjectState.php -X GET -Gd project=testProject3
testNewState3+ echo

+ sqlite3 DB/waved.db 'SELECT * FROM project;'
1|testProject1|testNewState1|1390766914|1|1390766917|1
2|testProject2|testNewState2|1390766914|1|1390766917|1
3|testProject3|testNewState3|1390766915|1|1390766917|1