Class: CreateChecksumAuditLogs
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateChecksumAuditLogs
- Defined in:
- lib/generators/sufia/models/templates/migrations/create_checksum_audit_logs.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 19 |
# File 'lib/generators/sufia/models/templates/migrations/create_checksum_audit_logs.rb', line 16 def self.down remove_index(:checksum_audit_logs, :name => 'by_pid_and_dsid') drop_table :checksum_audit_logs end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/sufia/models/templates/migrations/create_checksum_audit_logs.rb', line 2 def self.up create_table :checksum_audit_logs do |t| t.string :pid t.string :dsid t.string :version t.integer :pass t.string :expected_result t.string :actual_result t. end add_index :checksum_audit_logs, [:pid, :dsid], :name=>'by_pid_and_dsid', :order => {:created_at => "DESC" } end |