我具有以下属性,并将插入语句插入我的liquibase变更集文件中
Block1
<property name="RESTRICTED_ADMIN_UUID" value="uuid_generate_v4()" dbms="postgresql"/>
<property name="FULL_ACCESS_ADMIN_UUID" value="uuid_generate_v4()" dbms="postgresql"/>
<property name="MANAGE_INBOX_C_UUID" value="uuid_generate_v4()" dbms="postgresql"/>
Block2
<insert tableName="role">
<column name="id" valueComputed="${RESTRICTED_ADMIN_UUID}"/>
<column name="version" value="0"/>
<column name="description" value="Default restricted role for mapped-free-plan users"/>
<column name="name" value="RESTRICTED_ADMIN"/>
<column name="status" value="ACTIVE"/>
<column name="bp_id" value="0"/>
</insert>
<insert tableName="role">
<column name="id" valueComputed="${FULL_ACCESS_ADMIN_UUID}"/>
<column name="version" value="0"/>
<column name="description" value="Default restricted role for mapped-free-plan users"/>
<column name="name" value="FULL_ACCESS_ADMIN"/>
<column name="status" value="ACTIVE"/>
<column name="bp_id" value="0"/> <!-- 0 means default template object -->
</insert>
Block3
<insert tableName="permissions">
<column name="id" valueComputed="${MANAGE_INBOX_C_UUID}"/>
<column name="version" value="0"/> <column name="description" value="Manage inbox create"/>
<column name="name" value="MANAGE_INBOX_C"/>
</insert>
Block4
<insert tableName="role_permission">
<column name="id" valueComputed="uuid_generate_v4()"/>
<column name="version" value="0"/>
<column name="is_all" value="FALSE"/>
<column name="is_create" value="TRUE"/>
<column name="is_delete" value="FALSE"/>
<column name="is_read" value="FALSE"/>
<column name="is_update" value="FALSE"/>
<column name="permission_id" valueComputed="${MANAGE_INBOX_C_UUID}"/>
<column name="role_id" valueComputed="${RESTRICTED_ADMIN_UUID}"/>
</insert>
<property name="RESTRICTED_ADMIN_UUID" value="uuid_generate_v4()" dbms="postgresql"/>
<property name="FULL_ACCESS_ADMIN_UUID" value="uuid_generate_v4()" dbms="postgresql"/>
<property name="MANAGE_INBOX_C_UUID" value="uuid_generate_v4()" dbms="postgresql"/>
1、2、3块正常运行,没有任何错误。
第4块出现以下错误
=======================================
预期结果:
第4块中的insert语句类似于
<insert tableName="role">
<column name="id" valueComputed="${RESTRICTED_ADMIN_UUID}"/>
<column name="version" value="0"/>
<column name="description" value="Default restricted role for mapped-free-plan users"/>
<column name="name" value="RESTRICTED_ADMIN"/>
<column name="status" value="ACTIVE"/>
<column name="bp_id" value="0"/>
</insert>
<insert tableName="role">
<column name="id" valueComputed="${FULL_ACCESS_ADMIN_UUID}"/>
<column name="version" value="0"/>
<column name="description" value="Default restricted role for mapped-free-plan users"/>
<column name="name" value="FULL_ACCESS_ADMIN"/>
<column name="status" value="ACTIVE"/>
<column name="bp_id" value="0"/> <!-- 0 means default template object -->
</insert>