[
https://issues.apache.org/jira/browse/EMPIREDB-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16747522#comment-16747522
]
Rainer Döbele commented on EMPIREDB-279:
----------------------------------------
Hello Samir,
thanks for letting us know about this problem.
Obviously this hasn't been taken into account when the dropping of sequences
was added.
And as far as I can see, you are right, a call to addElementName() shoud
resolve this.
I will create a new ticket for this problem and assign it to our current
release.
Regards
Rainer
> Sequences left after dropping my Database. Can't create a new one.
> ------------------------------------------------------------------
>
> Key: EMPIREDB-279
> URL: https://issues.apache.org/jira/browse/EMPIREDB-279
> Project: Empire-DB
> Issue Type: Bug
> Components: Core
> Reporter: Björn Johannisson
> Assignee: Rainer Döbele
> Priority: Minor
> Fix For: empire-db-2.4.7
>
>
> Dropping the full Database should remove it completly. I can't create a new
> DB, because there are still parts of the old one left. In this case, they are
> the sequences.
> The following error appears, while building the db new:
> INFO [2018/09/05 14:00]: An Error occured. Message is: The database
> operation failed. Native error is: Es gibt bereits ein Objekt mit diesem
> Namen
> at
> org.apache.empire.exceptions.EmpireException.log(EmpireException.java:124)
> org.apache.empire.db.exceptions.EmpireSQLException: The database operation
> failed. Native error is: Es gibt bereits ein Objekt mit diesem Namen
> Drop the sequences at this positions, please:
> org.apache.empire.db.mysql DBDatabaseDriverMySQL.class
> method:getDDLScript //Table case DROP:
> org.apache.empire.db.oracle DBDAtabaseDriverOracle.class
> method:getDDLScript //Table case DROP:
> org.apache.empire.db.hsql DBDAtabaseDriverHSql.class
> method:getDDLScript //Table case DROP:
> All drivers use sequences. The method to drop them is usable in all three
> classes. If there is no sequence for the table, nothing happens.
> following opperation should be added to the script, before dropping the table
> itself:
> for (DBColumn c : table.getPrimaryKey().getColumns())
> {
> if (c.getDataType() == DataType.AUTOINC && c instanceof
> DBTableColumn)
> {
> DBTableColumn x = (DBTableColumn) c;
> script.addStmt("drop sequence " + x.getDefaultValue());
> }
> }
> this Operation was part of my workaround for that problem.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)