Skip to content

Commit

Permalink
Postgresql uniqueIndex error with sheme. #803 / exclude SQL Server fr…
Browse files Browse the repository at this point in the history
…om test
  • Loading branch information
Tapac committed Aug 2, 2020
1 parent 388b68d commit 8b8f756
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ class SchemaTests : DatabaseTestsBase() {
fun `create and set schema tests`() {
withDb(excludeSettings = listOf(TestDB.MYSQL, TestDB.MARIADB)) {
if (currentDialect.supportsCreateSchema) {
val schema = if (currentDialect is SQLServerDialect) {
exec("GRANT CREATE SCHEMA TO guest")
exec("SETUSER 'guest'")
Schema("MYSCHEMA", "guest")
} else if (currentDialect is OracleDialect) {
Schema("MYSCHEMA", password = "pwd4myschema", defaultTablespace = "tbs_perm_01", quota = "20M", on = "tbs_perm_01")
} else {
Schema("MYSCHEMA")
val schema = when (currentDialect) {
is SQLServerDialect -> {
exec("GRANT CREATE SCHEMA TO guest")
exec("SETUSER 'guest'")
Schema("MYSCHEMA", "guest")
}
is OracleDialect -> {
Schema("MYSCHEMA", password = "pwd4myschema", defaultTablespace = "tbs_perm_01", quota = "20M", on = "tbs_perm_01")
}
else -> {
Schema("MYSCHEMA")
}
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CreateIndexTests : DatabaseTestsBase() {
}
val schema1 = Schema("Schema1")
val schema2 = Schema("Schema2")
withSchemas(listOf(TestDB.SQLITE), schema1, schema2) {
withSchemas(listOf(TestDB.SQLITE, TestDB.SQLSERVER), schema1, schema2) {
SchemaUtils.setSchema(schema1)
SchemaUtils.createMissingTablesAndColumns(TestTable)
assertEquals(true, TestTable.exists())
Expand Down

0 comments on commit 8b8f756

Please sign in to comment.