Add structured errors to schema

This commit is contained in:
Maximilian Grundke
2017-07-03 10:09:48 +02:00
parent 6c353d611d
commit d2a089d057
17 changed files with 144 additions and 1 deletions

View 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

View File

@ -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

View 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

View File

@ -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