second changeset in the Change Log not working

Description

I see this error when trying to add a column to a table that already exists.

Unexpected error running Liquibase: Table 'DATABASECHANGELOG' already exists

The ChangeLog file, that i am executing from the Command prompt is :

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

<changeSet id="1.0" author="Jitu">
<createTable tableName="student">
<column name="id" type="int">
</column>
<column name="name" type="varchar(50)">
</column>
<column name="enrolled" type="boolean"/>
</createTable>
</changeSet>
<changeSet id="2.0" author="Jitu">
<addColumn tableName="student">
<column name="grade" type="float(7,2)">
</column>
</addColumn>
</changeSet>
</databaseChangeLog>

ChangeSet id 2.0 is giving me this issue.

Please help!

Environment

I am using Liquibase 3.6.2 and connecting to a Mysql database in a docker container on my windows 10 machine.

Activity

Show:

Jitu Bora 
July 22, 2018 at 4:39 PM

Not sure if i had to downgrade the version. But this was 'fixed' by going to schema 'sys' in place of 'mysql'.

Fixed

Details

Reporter

Components

Fix versions

Affects versions

Priority

Created July 22, 2018 at 3:14 AM
Updated July 22, 2018 at 4:39 PM
Resolved July 22, 2018 at 4:39 PM