Class: CreateProjects

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

Instance Method Summary collapse

Instance Method Details

#changeObject



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/watch_tower/server/db/migrate/001_create_projects.rb', line 4

def change
  create_table :projects do |t|
    t.string :name, null: false
    t.string :path, null: false
    t.integer :elapsed_time, default: 0
    t.integer :files_count

    t.timestamps
  end

  add_index :projects, :name
  add_index :projects, :path
end