Class: CreateTasks

Inherits:
Object
  • Object
show all
Defined in:
lib/twenty-backend/migration/2_create_tasks.rb

Instance Method Summary collapse

Instance Method Details

#downObject



14
15
16
# File 'lib/twenty-backend/migration/2_create_tasks.rb', line 14

def down
  drop_table(:tasks)
end

#upObject



4
5
6
7
8
9
10
11
12
# File 'lib/twenty-backend/migration/2_create_tasks.rb', line 4

def up
  create_table(:tasks) do |t|
    t.string :title, null: false
    t.text :content, null: false
    t.integer :status, null: false, default: 0
    t.belongs_to :project, null: false
    t.timestamps
  end
end