Class: CreateTasks

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/migrations/create_tasks.rb

Instance Method Summary collapse

Instance Method Details

#downObject



16
17
18
19
# File 'lib/migrations/create_tasks.rb', line 16

def down
  drop_table :tasks
  puts 'Migrating down'
end

#upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/migrations/create_tasks.rb', line 2

def up
  create_table :tasks do |t|
    t.date :day
    t.string :name
    t.datetime :synced_at
    t.datetime :edited_at
    t.datetime :deleted_at
    t.integer :duration
    t.integer :toggl_activity_id
    t.timestamps
  end
  puts 'Migrating up'
end