Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Fixed DDL regression where COMMENT ON TABLE is missing schema (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuwy committed May 13, 2016
1 parent 4b2de7c commit 5897a81
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ case class DdlCommand private[cli] (
val migrationMap = Migrations.buildMigrationMap(schemas)
val validOrderingMap = Migrations.getOrdering(migrationMap)
val orderingMap = validOrderingMap.collect { case (k, Success(v)) => (k, v) }
val (migrationErrors, migrations) = splitValidations(Migrations.reifyMigrationMap(migrationMap, schema, varcharSize))
val (migrationErrors, migrations) = splitValidations(Migrations.reifyMigrationMap(migrationMap, Some(dbSchema), varcharSize))

// Order table-definitions according with migrations
val ddlFiles = ddlMap.map { case (description, table) =>
Expand Down Expand Up @@ -155,8 +155,8 @@ case class DdlCommand private[cli] (
val schemaCreate = Ddl.Schema(dbSchema).toDdl
val combined = getFileName(description)
val tableName = SU.getTableName(description)
val table = RDG.getTableDdl(flatSchema, tableName, schema, varcharSize, rawMode)
val comment = RDG.getTableComment(tableName, schema, description)
val table = RDG.getTableDdl(flatSchema, tableName, Some(dbSchema), varcharSize, rawMode)
val comment = RDG.getTableComment(tableName, Some(dbSchema), description)
TableDefinition(combined._1, combined._2, RDG.RedshiftDdlHeader, schemaCreate, table, comment)
}

Expand Down

0 comments on commit 5897a81

Please # to comment.