liquibase-changeLog.yml 2.85 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
databaseChangeLog:

# Application Blocks: upgrade user to BasicUser
- changeSet:
    id: 1495959628118-1
    author: matijaobreza (generated)
    changes:
    - renameTable:
        newTableName: userrole
        oldTableName: user_role

- changeSet:
    id: 1495959628118-3
    author: matijaobreza (generated)
    changes:
    - renameColumn:
        columnDataType: varchar(255)
        newColumnName: fullName
        oldColumnName: name
        remarks: Full name of user
        tableName: user

- changeSet:
    id: 1495959628118-5
    author: matijaobreza (generated)
    changes:
    - addColumn:
        tableName: user
        columns:
        - column:
            constraints:
              nullable: false
            name: active
            type: bit
        - column:
            name: createdBy
            type: bigint
        - column:
            name: lastModifiedBy
            type: bigint
        - column:
            name: lastModifiedDate
            type: datetime
        - column:
            name: passwordExpires
            type: datetime
        - column:
            name: shortName
            type: varchar(20)
        - column:
            name: version
            type: integer

- changeSet:
    id: 1495959628118-6
    author: mobreza
    changes:
    - sql:
        comment: Migrate user.enabled to user.active = user.enabled;
        sql: update user set active = enabled;

- changeSet:
    id: 1495959628118-7
    author: matijaobreza (generated)
    changes:
    - renameColumn:
        columnDataType: varchar(20)
        newColumnName: accountType
        oldColumnName: loginType
        remarks: Account type
        tableName: user
    - sql:
        comment: loginType#PASSWORD is changed to accountType#LOCAL
        sql: update user set accountType = 'LOCAL' where accountType = 'PASSWORD';

- changeSet:
    id: 1495959628118-8
    author: mobreza
    changes:
    - sql:
        comment: Assign user.version
        sql: update user set version = 1 where version is null;

- changeSet:
    id: 1495959628118-9
    author: matijaobreza (generated)
    changes:
    - addColumn:
        tableName: user
        columns:
        - column:
            name: createdDate
            type: datetime
        - column:
            name: accountExpires
            type: datetime

- changeSet:
    id: 1495959628118-10
    author: matijaobreza (generated)
    changes:
    - addUniqueConstraint:
        columnNames: shortName
        constraintName: UC_USERSHORTNAME_COL
        tableName: user

- changeSet:
    id: 1495959628118-11
    author: matijaobreza (generated)
    changes:
    - renameColumn:
        columnDataType: bigint
        oldColumnName: user_id
        newColumnName: userId
        tableName: userrole
    - renameColumn:
        columnDataType: varchar(50)
        oldColumnName: user_role
        newColumnName: role
        tableName: userrole