databaseChangeLog:
  - changeSet:
      id: add-last-download-to-file
      author: maverick
      changes:
        - addColumn:
            tableName: file
            columns:
              - column:
                  name: last_download
                  type: VARCHAR(255)
                  constraints:
                    nullable: true
  - changeSet:
      id: add-fk-last-download
      author: maverick
      changes:
        - addForeignKeyConstraint:
            baseTableName: file
            baseColumnNames: last_download
            constraintName: fk_file_last_download
            referencedTableName: download_status
            referencedColumnNames: storage_id
            onDelete: SET NULL
            onUpdate: NO ACTION
            deferrable: false
            initiallyDeferred: false
            validate: true