Skip to content

Instantly share code, notes, and snippets.

@Nursultan91
Created May 18, 2017 07:14
Show Gist options
  • Save Nursultan91/afae7b7fea74bab1bedf7e2cd4e05fff to your computer and use it in GitHub Desktop.
Save Nursultan91/afae7b7fea74bab1bedf7e2cd4e05fff to your computer and use it in GitHub Desktop.
Не хочет принимать миграцию.
class CreateTaskstatuses < ActiveRecord::Migration
def change
create_table :taskstatuses do |t|
t.reference :user
t.reference :task
t.string :task_status
t.timestamps null: false
end
add_foreign_key :taskstatuses, :tasks
add_foreign_key :taskstatuses, :users
add_index :taskstatuses, [:task_id, :user_id], :unique => true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment