Class: AddHashToFiles

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/watch_tower/server/db/migrate/006_add_hash_to_files.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



4
5
6
7
# File 'lib/watch_tower/server/db/migrate/006_add_hash_to_files.rb', line 4

def change
  add_column :files, :file_hash, :string, null: false, default: ""
  add_index :files, :file_hash
end