Skip to content
Permalink
Browse files
Use DELETE instead of TRUNCATE for DB2
  • Loading branch information
Trevor Sibanda committed Aug 16, 2016
1 parent fd6c637 commit 5f3cee40971f7b42fe8cb8ecb399bdd3ebe8972f
Showing 1 changed file with 3 additions and 1 deletion.
@@ -132,7 +132,9 @@ trait DB2Profile extends JdbcProfile {
} else super.createIndex(idx)
}

override def truncateTable = s"TRUNCATE TABLE ${quoteTableName(tableNode)} IMMEDIATE"
//For compatibility with all versions of DB2
//http://stackoverflow.com/questions/3006999/sql-query-to-truncate-table-in-ibm-db2
override def truncateTable = s"DELETE FROM ${quoteTableName(tableNode)}"
}

class ColumnDDLBuilder(column: FieldSymbol) extends super.ColumnDDLBuilder(column) {

0 comments on commit 5f3cee4

Please sign in to comment.