创建一个新的PostgreSQl数据库

时间:2019-06-24 09:42:16

标签: postgresql liquibase-sql

我正在尝试使用Liquibase创建一个新的PostgreSQL数据库。 我正在使用以下语法:

<?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.0.xsd">

<changeSet id="23" author="pre_actions">
    <sqlFile dbms="postgresql" path="src\main\resources\liquibase\createDB.sql" />
</changeSet>

  

[错误]无法执行目标   org.liquibase:liquibase-maven-plugin:3.6.3:update(default-cli)on   项目cre_roles_schemas:设置或运行Liquibase时出错:   变更集迁移失败   src / main / resources / liquibase / createDB.xml :: 23 :: pre_actions:[错误]
  原因:liquibase.exception.DatabaseException:错误:CREATE DATABASE   无法在事务块内运行[失败的SQL:--Create DB   octopusdb [错误]创建数据库octopusdb所有者octopus]

-create database语句可直接从psql正常运行

0 个答案:

没有答案
相关问题