Last active
October 29, 2020 12:16
-
-
Save sagrawal31/b71446751f4ea3fa040832e1c9a032ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| databaseChangeLog = { | |
| changeSet(author: 'Shashank', id: 'post.description.051020123') { | |
| comment { 'increase description to 1400 chars' } | |
| modifyDataType(tableName: 'post', columnName: 'description', | |
| newDataType: 'varchar(1400)') | |
| // Altering the column removes the not null property (makes it nullable) if your column was non-nullable. | |
| // To fix this, you can pass "NOT NULL" to newDataType attribute as given below | |
| // https://stackoverflow.com/questions/35864845/liquibase-modifydatatype-tag-always-makes-the-column-nullable | |
| modifyDataType(tableName: 'post', columnName: 'description', | |
| newDataType: 'varchar(1400) NOT NULL') | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment