Skip to content

Conversation

@artembilan
Copy link
Member

JIRA: https://jira.spring.io/browse/INT-4574

Some RDBMS don't allow have nullable columns for primary keys

  • Add NOT NULL for all the columns involved in primary keys

Cherry-pick to 4.3.x

JIRA: https://jira.spring.io/browse/INT-4574

Some RDBMS don't allow have nullable columns for primary keys

* Add NOT NULL for all the columns involved in primary keys

**Cherry-pick to 4.3.x**
Copy link
Contributor

@garyrussell garyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question.

-- This is only needed if the message group store property 'priorityEnabled' is true
-- CREATE UNIQUE INDEX INT_CHANNEL_MSG_PRIORITY_IDX ON INT_CHANNEL_MESSAGE (REGION, GROUP_KEY, MESSAGE_PRIORITY DESC, CREATED_DATE, MESSAGE_SEQUENCE);
CREATE INDEX INT_CHANNEL_MSG_DATE_IDX ON INT_CHANNEL_MESSAGE (CREATED_DATE, MESSAGE_SEQUENCE);
CREATE INDEX INT_CHANNEL_MSG_PRIORITY_IDX ON INT_CHANNEL_MESSAGE (MESSAGE_PRIORITY DESC, CREATED_DATE, MESSAGE_SEQUENCE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changes to this table here, but not on master?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! this must not be here. The problem is with vpp .We Don't have it on master any more.
Will fix it later here.
We must keep your index here.

@artembilan
Copy link
Member Author

Restored all the previous state of scripts with the fix for VPP template.

Let me know if this doesn't back-port to 4.3.x properly.

We don't have VPP on master after this: f970bf0

@garyrussell garyrussell merged commit c64524b into spring-projects:5.0.x Jan 15, 2019
@garyrussell
Copy link
Contributor

Cherry-pick is not clean because the channel tables are in separate files; please backport; thanks.

artembilan added a commit that referenced this pull request Jan 15, 2019
* INT-4574: JDBC: Add NOT NULL for primary keys

JIRA: https://jira.spring.io/browse/INT-4574

Some RDBMS don't allow have nullable columns for primary keys

* Add NOT NULL for all the columns involved in primary keys

**Cherry-pick to 4.3.x**

* * Include index generation into the `schema.sql.vpp`

* * Remove redundant blank line from generated scripts

* * Fix INT_CHANNEL_MESSAGE primary generation

# Conflicts:
#	spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-mysql.sql
#	spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-oracle.sql
#	spring-integration-jdbc/src/main/sql/schema.sql.vpp
@artembilan
Copy link
Member Author

Back-ported to 4.3.x as 7242fc8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants