Sha256: 690c38f4df982ffba825fcb6f599458a3c9a3af94a8974198fcd76d359459d27

Contents?: true

Size: 551 Bytes

Versions: 36

Compression:

Stored size: 551 Bytes

Contents

class ChangeChecksumAuditLog < ActiveRecord::Migration[5.2]
  def change
    rename_column :checksum_audit_logs, :version, :checked_uri
    add_column    :checksum_audit_logs, :passed, :boolean

    reversible do |dir|
      dir.up do
        execute 'UPDATE checksum_audit_logs SET passed = (pass = 1)'
      end
      dir.down do
        execute 'UPDATE checksum_audit_logs SET pass = CASE WHEN passed THEN 1 ELSE 0 END'
      end
    end

    remove_column :checksum_audit_logs, :pass
    add_index     :checksum_audit_logs, :checked_uri
  end
end

Version data entries

36 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.2 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-5.0.2 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb
hyrax-5.0.1 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb
hyrax-5.0.1 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-5.0.0 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-5.0.0 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb
hyrax-5.0.0.rc3 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb
hyrax-5.0.0.rc3 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-5.0.0.rc2 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb
hyrax-5.0.0.rc2 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-5.0.0.rc1 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-5.0.0.rc1 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb
hyrax-3.6.0 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-4.0.0 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-4.0.0 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb
hyrax-4.0.0.rc3 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-4.0.0.rc3 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb
hyrax-4.0.0.rc2 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb
hyrax-4.0.0.rc2 .dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb
hyrax-4.0.0.rc1 .koppie/db/migrate/20210911143569_change_checksum_audit_log.hyrax.rb