Skip to content

Commit

Permalink
Migration fix for PG
Browse files Browse the repository at this point in the history
  • Loading branch information
dgcliff committed Jan 16, 2019
1 parent 4048519 commit 05cb533
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 99 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minerva (0.1.19)
minerva (0.1.20)
rails (> 5.2)

GEM
Expand Down
4 changes: 3 additions & 1 deletion db/migrate/20181218183728_create_minerva_assignments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ class CreateMinervaAssignments < ActiveRecord::Migration[5.2]
def change
create_table :minerva_assignments do |t|
t.string :title
t.references :interface, foreign_key: true
t.boolean :automated
t.integer :interface_id

t.timestamps
end
add_foreign_key :minerva_assignments, :minerva_interfaces, column: :interface_id
add_index :minerva_assignments, :interface_id
end
end
9 changes: 7 additions & 2 deletions db/migrate/20181218183815_create_minerva_states.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ def change
t.integer :user_id
t.integer :role_id
t.integer :work_id
t.references :assignment, foreign_key: true
t.references :status, foreign_key: true
t.integer :minerva_assignment_id
t.integer :minerva_status_id

t.timestamps
end
add_index :minerva_states, :creator_id
add_index :minerva_states, :user_id
add_index :minerva_states, :role_id
add_index :minerva_states, :work_id

add_foreign_key :minerva_states, :minerva_assignments, column: :minerva_assignment_id
add_index :minerva_states, :minerva_assignment_id
add_foreign_key :minerva_states, :minerva_statuses, column: :minerva_status_id
add_index :minerva_states, :minerva_status_id
end
end
2 changes: 1 addition & 1 deletion lib/minerva/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Minerva
VERSION = '0.1.19'
VERSION = '0.1.20'
end
94 changes: 0 additions & 94 deletions test/dummy/db/schema.rb

This file was deleted.

0 comments on commit 05cb533

Please sign in to comment.