在Liquibase中执行序列

时间:2017-04-14 08:54:58

标签: oracle liquibase

如何在Liquibase中执行序列?我尝试过valueComputed =" TAB.NEXTVAL"但它不起作用,我得到一条消息,TAB_ID不能为NULL。

<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">

<changeSet author="Me" id="sql-example">  
       <comment>My comment</comment>  
       <insert tableName="TAB_WITH_FILE" dbms="oracle">
             <column name="TAB_ID" valueComputed="TAB.NEXTVAL"/>
             <column name="TAB_FILE_NAME">Desert.jpg</column>
             <column name="TAB_FILE" valueBlobFile="files/Desert.jpg"/>
       </insert>
</changeSet>    

</databaseChangeLog>

0 个答案:

没有答案