Add structured errors to schema
This commit is contained in:
11
db/migrate/20170703075832_create_error_templates.rb
Normal file
11
db/migrate/20170703075832_create_error_templates.rb
Normal file
@ -0,0 +1,11 @@
|
||||
class CreateErrorTemplates < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :error_templates do |t|
|
||||
t.belongs_to :execution_environment
|
||||
t.string :name
|
||||
t.string :signature
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,11 @@
|
||||
class CreateErrorTemplateAttributes < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :error_template_attributes do |t|
|
||||
t.belongs_to :error_template
|
||||
t.string :key
|
||||
t.string :regex
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
10
db/migrate/20170703080205_create_structured_errors.rb
Normal file
10
db/migrate/20170703080205_create_structured_errors.rb
Normal file
@ -0,0 +1,10 @@
|
||||
class CreateStructuredErrors < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :structured_errors do |t|
|
||||
t.references :error_template
|
||||
t.belongs_to :file
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,11 @@
|
||||
class CreateStructuredErrorAttributes < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :structured_error_attributes do |t|
|
||||
t.belongs_to :structured_error
|
||||
t.references :error_template_attribute
|
||||
t.string :value
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
33
db/schema.rb
33
db/schema.rb
@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170608141612) do
|
||||
ActiveRecord::Schema.define(version: 20170703080355) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@ -47,6 +47,22 @@ ActiveRecord::Schema.define(version: 20170608141612) do
|
||||
t.string "oauth_secret", limit: 255
|
||||
end
|
||||
|
||||
create_table "error_template_attributes", force: :cascade do |t|
|
||||
t.integer "error_template_id"
|
||||
t.string "key"
|
||||
t.string "regex"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "error_templates", force: :cascade do |t|
|
||||
t.integer "execution_environment_id"
|
||||
t.string "name"
|
||||
t.string "signature"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "errors", force: :cascade do |t|
|
||||
t.integer "execution_environment_id"
|
||||
t.text "message"
|
||||
@ -268,6 +284,21 @@ ActiveRecord::Schema.define(version: 20170608141612) do
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "structured_error_attributes", force: :cascade do |t|
|
||||
t.integer "structured_error_id"
|
||||
t.integer "error_template_attribute_id"
|
||||
t.string "value"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "structured_errors", force: :cascade do |t|
|
||||
t.integer "error_template_id"
|
||||
t.integer "file_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "submissions", force: :cascade do |t|
|
||||
t.integer "exercise_id"
|
||||
t.float "score"
|
||||
|
Reference in New Issue
Block a user