Created
May 18, 2017 07:14
-
-
Save Nursultan91/afae7b7fea74bab1bedf7e2cd4e05fff to your computer and use it in GitHub Desktop.
Не хочет принимать миграцию.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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