Liquibase不工作

时间:2018-05-09 15:35:36

标签: java spring-boot h2 liquibase

我的系统有以下问题。 我有一个关于h2数据库的表,其中包含字段类型日期,但是当我尝试在liquibase脚本上插入数据时,它返回一个错误,表示未出现错误,因为没有java.util.Date

这是我的控制台上的错误

Error on console

创建表

        query.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
            @Override
            public void onComplete(@NonNull Task<QuerySnapshot> task) {
                if (task.isSuccessful()) {
                    List<Places> placesList = new ArrayList<>();
                    for (DocumentSnapshot document : task.getResult()) {
                        Places place = document.toObject(Places.class);
                        placesList.add(place);
                    }                      
                    int placeCount = placesList.size();
                    Random randomGenerator = new Random();

                    randomPlaceList = new ArrayList<>(); //this is the activity's list
                    for (int i = 1; i <= 3; i++) {
                        randomPlaceList.add(placesList.get(randomGenerator.nextInt(placeCount)));
                    }
                    ListView mListView = (ListView) findViewById(R.id.place_list);
                    PlaceAdapter placeAdapter = new PlaceAdapter(randomPlaceList, getBaseContext());
                    mListView.setAdapter(placeAdapter);                    
            }
        });

在故事中插入数据

#tabela Aluno
  - changeSet:
      id: 1
      author: Nicholas
      changes: 
        - createTable:
            tableName: Aluno
            columns:
              - column:
                  name: AluId
                  type: int
                  autoIncrement: true
                  constraints:
                    primaryKey: true
                    nullable: false
              - column:
                  name: AluNome
                  type: varchar(50)
              - column:
                  name: AluEnd
                  type: varchar(50)
              - column:
                  name: AluCPF
                  type: varchar(11)
              - column:
                  name: AluBairro
                  type: varchar(50)
              - column:
                  name: AluCel
                  type: varchar(11)
              - column:
                  name: AluTel
                  type: varchar(10)
              - column:
                  name: AluPaga
                  type: varchar(30)
              - column:
                  name: AluDataEnt
                  type: date
              - column:
                  name: AluDataVenc
                  type: date

这是我的依赖

#popular Aluno
  - changeSet:
      id: 88801
      author: Nicholas
      changes:
        - insert:
            columns:
              - column:
                  name: AluId
                  type: int
                  value: 1
              - column:
                  name: AluNome
                  type: varchar(50)
                  value: Mariana Celegati
              - column:
                  name: AluEnd
                  type: varchar(50)
                  value: Rua Siqueira Bueno, 90
              - column:
                  name: AluCPF
                  type: varchar(11)
                  value: 44455522211
              - column:
                  name: AluBairro
                  type: varchar(50)
                  value: Mooca
              - column:
                  name: AluCel
                  type: varchar(10)
                  value: 55552222
              - column:
                  name: AluTel
                  type: varchar(11)
                  value: 966662222
              - column:
                  name: AluDataEnt
                  type: date
                  valueDate: 2017-02-15
              - column:
                  name: AluDataVenc
                  type: date
                  valueDate: 2018-02-15
            tableName: Aluno

我正在使用java 1.8

0 个答案:

没有答案