Add Testrun to schema
This commit is contained in:
4
app/models/testrun.rb
Normal file
4
app/models/testrun.rb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
class Testrun < ActiveRecord::Base
|
||||||
|
belongs_to :file
|
||||||
|
belongs_to :submission
|
||||||
|
end
|
13
db/migrate/20160302133540_create_testruns.rb
Normal file
13
db/migrate/20160302133540_create_testruns.rb
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
class CreateTestruns < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :testruns do |t|
|
||||||
|
t.boolean :passed
|
||||||
|
t.text :output
|
||||||
|
|
||||||
|
t.belongs_to :file
|
||||||
|
t.belongs_to :submission
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
11
db/schema.rb
11
db/schema.rb
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20160204111716) do
|
ActiveRecord::Schema.define(version: 20160302133540) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@ -211,4 +211,13 @@ ActiveRecord::Schema.define(version: 20160204111716) do
|
|||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "testruns", force: true do |t|
|
||||||
|
t.boolean "passed"
|
||||||
|
t.text "output"
|
||||||
|
t.integer "file_id"
|
||||||
|
t.integer "submission_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user