Fix postgresql test

This commit is contained in:
Travis Burtrum 2018-05-16 23:52:21 -04:00
parent 62cf37dd27
commit 20c933b1c9
1 changed files with 4 additions and 4 deletions

View File

@ -134,12 +134,12 @@ public class QueryMapperTest {
} catch(Exception e) { } catch(Exception e) {
// ignore, means the database hasn't been set up yet // ignore, means the database hasn't been set up yet
} }
if(isWrapperFor(conn, "org.apache.derby.impl.jdbc.EmbedConnection")) { if(isWrapperFor(conn, "com.microsoft.sqlserver.jdbc.SQLServerConnection")) {
// derby doesn't support DATETIME
qm.executeUpdate("CREATE TABLE person (person_no NUMERIC, first_name VARCHAR(40), last_name VARCHAR(40), birth_date TIMESTAMP)");
} else {
// mssql doesn't support inserting into TIMESTAMP // mssql doesn't support inserting into TIMESTAMP
qm.executeUpdate("CREATE TABLE person (person_no NUMERIC, first_name VARCHAR(40), last_name VARCHAR(40), birth_date DATETIME)"); qm.executeUpdate("CREATE TABLE person (person_no NUMERIC, first_name VARCHAR(40), last_name VARCHAR(40), birth_date DATETIME)");
} else {
// derby doesn't support DATETIME
qm.executeUpdate("CREATE TABLE person (person_no NUMERIC, first_name VARCHAR(40), last_name VARCHAR(40), birth_date TIMESTAMP)");
} }
qm.executeUpdate("CREATE TABLE boss (person_no NUMERIC, department VARCHAR(40))"); qm.executeUpdate("CREATE TABLE boss (person_no NUMERIC, department VARCHAR(40))");
qm.executeUpdate("CREATE TABLE val (val_no NUMERIC, num_val NUMERIC, str_val VARCHAR(40))"); qm.executeUpdate("CREATE TABLE val (val_no NUMERIC, num_val NUMERIC, str_val VARCHAR(40))");