for real?
This commit is contained in:
parent
c4569551d9
commit
99c5a8b266
1 changed files with 10 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
class CreateRequests < ActiveRecord::Migration
|
||||
def change
|
||||
unless table_exists? :requests
|
||||
create_table :requests do |t|
|
||||
t.references :debtor, null: false
|
||||
t.references :creditor, null: false
|
||||
|
@ -11,6 +12,7 @@ class CreateRequests < ActiveRecord::Migration
|
|||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
|
||||
add_index :requests, :debtor_id unless index_exists?(:requests, :debtor)
|
||||
add_index :requests, :creditor_id unless index_exists?(:requests, :creditor)
|
||||
|
|
Loading…
Reference in a new issue