Merge pull request #232 from sturman/master

set name for primary key on create table
This commit is contained in:
Jean-Baptiste Onofré 2021-03-22 11:12:40 +01:00 committed by GitHub
commit b977f8c629
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -106,7 +106,7 @@ public class Statements {
+ ", SUB_DEST " + stringIdDataType
+ ", CLIENT_ID " + stringIdDataType + " NOT NULL" + ", SUB_NAME " + stringIdDataType
+ " NOT NULL" + ", SELECTOR " + stringIdDataType + ", LAST_ACKED_ID " + sequenceDataType
+ ", PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME))",
+ ", CONSTRAINT PK_" + getDurableSubAcksTableName() + " PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME))",
"ALTER TABLE " + getFullMessageTableName() + " ADD PRIORITY " + sequenceDataType,
"CREATE INDEX " + getFullMessageTableName() + "_PIDX ON " + getFullMessageTableName() + " (PRIORITY)",
"ALTER TABLE " + getFullMessageTableName() + " ADD XID " + stringIdDataType,

View File

@ -35,6 +35,7 @@ public class TransactJDBCAdapter extends ImageBasedJDBCAdaptor {
}
statements.setLockCreateStatement(lockCreateStatement);
statements.setDropAckPKAlterStatementEnd("DROP CONSTRAINT PK_" + statements.getDurableSubAcksTableName());
super.setStatements(statements);
}