Class: CreateTimeEntries

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

Instance Method Summary collapse

Instance Method Details

#changeObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/watch_tower/server/db/migrate/003_create_time_entries.rb', line 4

def change
  create_table :time_entries do |t|
    t.references :file, null: false
    t.datetime :mtime, null: false

    t.timestamps
  end

  add_index :time_entries, :file_id
end