<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<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.5.xsd"
                   logicalFilePath="migration/node-services.changelog-init.xml">

    <changeSet author="R3.Corda" id="add_version_column">
        <addColumn tableName="node_attachments">
            <column name="version" type="INT"/>
        </addColumn>
        <sql>update node_attachments set version = 1</sql>
        <addNotNullConstraint tableName="node_attachments" columnName="version" columnDataType="INT"/>
    </changeSet>
</databaseChangeLog>