diff --git a/.travis.yml b/.travis.yml index 05c6891f..6586a5ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,4 +23,4 @@ script: ./run-linux-tests after_script: - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT addons: - mariadb: '10.0' \ No newline at end of file + mariadb: '10.1' \ No newline at end of file diff --git a/misc_test.go b/misc_test.go index e6c9f3ae..822cc2d7 100644 --- a/misc_test.go +++ b/misc_test.go @@ -690,10 +690,8 @@ func TestProfileReplyStore(t *testing.T) { _, err := common.Prstore.Get(-1) recordMustNotExist(t, err, "PRID #-1 shouldn't exist") - _, err = common.Prstore.Get(0) recordMustNotExist(t, err, "PRID #0 shouldn't exist") - _, err = common.Prstore.Get(1) recordMustNotExist(t, err, "PRID #1 shouldn't exist") @@ -704,11 +702,11 @@ func TestProfileReplyStore(t *testing.T) { var profileID = 1 prid, err := common.Prstore.Create(profileID, "Haha", 1, "::1") - expect(t, err == nil, "Unable to create a profile reply") + expectNilErr(t, err) expect(t, prid == 1, "The first profile reply should have an ID of 1") profileReply, err := common.Prstore.Get(1) - expect(t, err == nil, "PRID #1 should exist") + expectNilErr(t, err) expect(t, profileReply.ID == 1, fmt.Sprintf("The profile reply should have an ID of 1 not %d", profileReply.ID)) expect(t, profileReply.ParentID == 1, fmt.Sprintf("The parent ID of the profile reply should be 1 not %d", profileReply.ParentID)) expect(t, profileReply.Content == "Haha", fmt.Sprintf("The profile reply's contents should be 'Haha' not '%s'", profileReply.Content)) diff --git a/query_gen/tables.go b/query_gen/tables.go index 299ab3fa..429c6e91 100644 --- a/query_gen/tables.go +++ b/query_gen/tables.go @@ -319,8 +319,8 @@ func createTables(adapter qgen.Adapter) error { qgen.DBTableColumn{"parsed_content", "text", 0, false, false, ""}, qgen.DBTableColumn{"createdAt", "createdAt", 0, false, false, ""}, qgen.DBTableColumn{"createdBy", "int", 0, false, false, ""}, // TODO: Make this a foreign key - qgen.DBTableColumn{"lastEdit", "int", 0, false, false, ""}, - qgen.DBTableColumn{"lastEditBy", "int", 0, false, false, ""}, + qgen.DBTableColumn{"lastEdit", "int", 0, false, false, "0"}, + qgen.DBTableColumn{"lastEditBy", "int", 0, false, false, "0"}, qgen.DBTableColumn{"ipaddress", "varchar", 200, false, false, "0.0.0.0.0"}, }, []qgen.DBTableKey{