Skip to content

Commit

Permalink
trigger hist is not longer an auto increment column
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Jul 10, 2014
1 parent 69379bd commit ad9ff9d
Showing 1 changed file with 0 additions and 5 deletions.
Expand Up @@ -41,11 +41,6 @@ public Db2SymmetricDialect(IParameterService parameterService, IDatabasePlatform
public boolean createOrAlterTablesIfNecessary(String... tables) {
boolean tablesCreated = super.createOrAlterTablesIfNecessary(tables);
if (tablesCreated) {
long triggerHistId = platform.getSqlTemplate().queryForLong("select max(trigger_hist_id) from "
+ parameterService.getTablePrefix() + "_trigger_hist") + 1;
platform.getSqlTemplate().update("alter table " + parameterService.getTablePrefix()
+ "_trigger_hist alter column trigger_hist_id restart with " + triggerHistId);
log.info("Resetting auto increment columns for {}", parameterService.getTablePrefix() + "_trigger_hist");
long dataId = platform.getSqlTemplate().queryForLong("select max(data_id) from " + parameterService.getTablePrefix()
+ "_data") + 1;
platform.getSqlTemplate().update("alter table " + parameterService.getTablePrefix()
Expand Down

0 comments on commit ad9ff9d

Please sign in to comment.