Skip to content

Instantly share code, notes, and snippets.

@ParthivPatel-BTC
Created September 10, 2019 02:06
Show Gist options
  • Save ParthivPatel-BTC/d9f192b1e16d8dbfae44d089b72a9687 to your computer and use it in GitHub Desktop.
Save ParthivPatel-BTC/d9f192b1e16d8dbfae44d089b72a9687 to your computer and use it in GitHub Desktop.
Migrations - Add tasks table
class CreateTasks < ActiveRecord::Migration[5.2]
def change
create_table :tasks do |t|
t.string :title
t.string :description
t.datetime :start_date
t.datetime :end_date
t.string :event
t.string :members
t.references :user, foreign_key: true
t.timestamps
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment