databaseChangeLog不包含条目列表。每个changeSet必须以'-changeSet:开始

时间:2020-10-15 21:57:48

标签: spring-boot yaml liquibase

我想用liquibase创建mysql person表。但是我遇到一个错误,所以

原因:liquibase.exception.ChangeLogParseException:databaseChangeLog不包含条目列表。每个changeSet必须以'-changeSet:'

开始

db.changelog-master.yaml

databaseChangeLog:
  -includeAll:
    path: db/changelog/v-0.1/

20201015-01-create-person-table.yaml

databaseChangeLog:
  - changeSet:
      id: 20201015-01
      author: nursultankhalilov
      changes:
        - createTable:
            tableName: persons
            columns:
              - column:
                name: person_id
                type: bigint
                autoIncrement: true
                constraints:
                  primaryKey: true
                  primaryKeyName: person_pk
                  nullable: false
              - column:
                name: person_name
                type: VARCHAR(255)
                constraints:
                  nullable: false
              - column:
                  name: person_surname
                  type: VARCHAR(255)
                  constraints:
                    nullable: false
              - column:
                  name: person_email
                  type: VARCHAR(255)
                  constraints:
                    nullable: false
                    unique: true
              - column:
                  name: person_phone
                  type: VARCHAR(20)

数据包结构:

this pic show packet structure

我在做什么错?请帮忙

1 个答案:

答案 0 :(得分:0)

我认为破折号后的“ -includeAll”中应该有一个空格