Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to use SET as a data type in my liquibase script

User_87R1BFeb 23 2023

I have spring boot with liquibase changeset in my system.

below is my changeset which I am running

    <changeSet id="1639718925269-1" author="abcd">
        <addColumn tableName="users">
            <column name="permissions" type="SET('DOWNLOAD_PHASE_II_FILE','DOWNLOAD_PHASE_III_FILE','DOWNLOAD_MERGED_FILE','DOWNLOAD_ERROR_FILE')"/>
        </addColumn>
    </changeSet>

when I run above changeset I get following error saying that data type is invalid for set


Caused by: liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for change set db/changelog/db.changelog-local.xml::1639718925269-1::abcd:
     Reason: liquibase.exception.DatabaseException: ORA-00902: invalid datatype
 [Failed SQL: (902) ALTER TABLE SYSTEM.users ADD permissions SET]
    at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:124)
    at liquibase.Liquibase.lambda$null$0(Liquibase.java:272)
    at liquibase.Scope.lambda$child$0(Scope.java:160)

my application-local.yml

server:
  port: 8080
spring:
  datasource:
    url: jdbc:oracle:thin:@localhost:1521:OraDoc
    username: system
    password: MyPasswd123
  liquibase:
    contexts: local

can anyone please help me out what wrong I am doing here?

Comments
Post Details
Added on Feb 23 2023
1 comment
252 views