Commit 52c30cbc authored by npedot's avatar npedot
Browse files

upgrades log4j, sl4j, h2

parent 44c3bc23
......@@ -22,12 +22,12 @@
......@@ -19,7 +19,7 @@ fun oid(schema: Schema, originTableName: String): ChangeSet {
val originTableName2 = originTableName
// adds one column autoincrement to origin table
val sid = "sid$originTableName"
sqlCommands.add("ALTER TABLE $originTableName ADD COLUMN $sid int NOT NULL auto_increment UNIQUE")
sqlCommands.add("ALTER TABLE $originTableName ADD COLUMN $sid int auto_increment DEFAULT ON NULL")
// TODO NOTA BENE !!! non togliere lo spazio iniziale altrimenti originTableName assume il valore di surrogateTableName.
schema.addSurrogateKey(" "+originTableName+":"+sid)
......@@ -23,7 +23,7 @@ class OidsTest {
val sqlCommands = oid(schema, originTableName).sqlCommands!!
// then
assertEquals("ALTER TABLE person ADD COLUMN sidperson int NOT NULL auto_increment UNIQUE",sqlCommands[0])
assertEquals("ALTER TABLE person ADD COLUMN sidperson int auto_increment DEFAULT ON NULL",sqlCommands[0])
assertEquals("CREATE TABLE SKEYperson AS SELECT sidperson,surname,name FROM person",sqlCommands[1])
// FIXME manca join name, ha preso solo surname
assertEquals("CREATE TABLE teacher_1 AS SELECT SKEYperson.sidperson,teacher.course FROM SKEYperson JOIN teacher ON SKEYperson.surname = teacher.surname",sqlCommands[2])
......@@ -123,11 +123,5 @@ table8: DepName , DepAddress
assertTrue(constraints.toString().contains("DOUBLE_INCLUSION SKEYPerson:sidPerson --> Person:sidPerson ; "))
fun test_three_tables() {
// given
val schema = Schema()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment