Skip to content

Commit

Permalink
No more CHAR datatypes, only varchar
Browse files Browse the repository at this point in the history
  • Loading branch information
fhanik committed Dec 11, 2024
1 parent ff86022 commit 40c053d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ALTER TABLE users ALTER COLUMN id SET DATA TYPE VARCHAR(36);
ALTER TABLE users ALTER COLUMN id SET DATA TYPE VARCHAR(36);
ALTER TABLE oauth_client_details ALTER COLUMN created_by SET DATA TYPE VARCHAR(36);
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ALTER TABLE users MODIFY id VARCHAR(36) NOT NULL;
ALTER TABLE users MODIFY id VARCHAR(36) NOT NULL;
ALTER TABLE oauth_client_details MODIFY created_by VARCHAR(36) NOT NULL;
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ALTER TABLE users ALTER COLUMN id TYPE VARCHAR(36);
ALTER TABLE users ALTER COLUMN id TYPE VARCHAR(36);
ALTER TABLE oauth_client_details ALTER COLUMN created_by TYPE VARCHAR(36);
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.cloudfoundry.identity.uaa.util.AlphanumericRandomValueStringGenerator;
import org.cloudfoundry.identity.uaa.zone.MultitenantJdbcClientDetailsService;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
Expand Down Expand Up @@ -79,6 +80,7 @@ void constraintViolation_WhenNoMatchingClientFound() throws Exception {
* @see <a href="https://dev.mysql.com/doc/refman/8.4/en/sql-mode.html#sqlmode_pad_char_to_full_length"> PAD_CHAR_TO_FULL_LENGTH </a>
*/
@Test
@Disabled("SQL Migration script 4.112 changes this column to varchar because MySQL deprecated PAD_CHAR_TO_FULL_LENGTH")
void createdByPadsTo36Chars() {
jdbcTemplate.execute(insertIntoOauthClientDetails(clientId, identityZoneId, "abcdef"));

Expand Down

0 comments on commit 40c053d

Please sign in to comment.