小编Ren*_*nte的帖子

使用 Liquibase、postgreSQL 和序列插入新数据

如果我的 ID 是连续的,我如何使用 Liquibase 为 PostgreSQL 进行插入。我尝试使用以下方法:

<changeSet author="rparente" id="service-1.1-2019-01-09-01">
        <insert tableName="tenant">
            <column name="id"defaultValueSequenceNext="hibernate_sequence"/>
            <column name="description" value="Prueba"/>
            <column name="name" value="antel"/>
            <column name="service_id" value="antel"/>
        </insert>
    </changeSet>
Run Code Online (Sandbox Code Playgroud)

我试着用

<changeSet author="rparente" id="service-1.1-2019-01-09-01">
        <insert tableName="tenant">
            <column name="id"  value="nextval('hibernate_sequence')"/>
            <column name="description" value="Prueba"/>
            <column name="name" value="antel"/>
            <column name="service_id" value="antel"/>
        </insert>
    </changeSet>
Run Code Online (Sandbox Code Playgroud)

错误是:

错误:“id”列中的空值违反了非空约束

postgresql liquibase

4
推荐指数
2
解决办法
4679
查看次数

从每个 Rest Assured 测试中获取“CURL”操作并在未通过测​​试时在控制台中打印

我需要从每个 Rest Assured 测试中获取“CURL”操作,并在未通过测​​试时在控制台中打印。这是可能的?

例如,转换:

 given().relaxedHTTPSValidation().
   auth().basic("name", "password").
   param("grant_type","client_credentials").
 when().
   post("https://test_url/oauth/token").
 then().
   statusCode(200);
Run Code Online (Sandbox Code Playgroud)

curl --user name:passwoed -k -X POST \
https://test_url/oauth/token \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d grant_type=client_credentials
Run Code Online (Sandbox Code Playgroud)

java testing rest curl rest-assured

4
推荐指数
2
解决办法
2385
查看次数

标签 统计

curl ×1

java ×1

liquibase ×1

postgresql ×1

rest ×1

rest-assured ×1

testing ×1