start of iteration 2
Some checks failed
/ Run tests (push) Failing after 1m19s
/ Run system tests (push) Failing after 1m18s
/ Build, push and deploy image (push) Has been skipped

This commit is contained in:
david 2024-10-31 23:13:18 +01:00
parent 9fb87a74ce
commit 729ed13521
75 changed files with 705 additions and 170 deletions

View file

@ -0,0 +1,12 @@
class CreatePages < ActiveRecord::Migration[7.2]
def change
create_table :pages do |t|
t.integer :position
t.string :path
t.string :url
t.references :report, null: false, foreign_key: true
t.timestamps
end
end
end

View file

@ -0,0 +1,6 @@
class AddPageIdToElements < ActiveRecord::Migration[7.2]
def change
add_reference :elements, :page, null: false, foreign_key: true
add_column :elements, :position, :integer, default: 0, null: false
end
end

View file

@ -0,0 +1,5 @@
class RemoveReportIdFromElements < ActiveRecord::Migration[7.2]
def change
remove_reference :elements, :report, null: false, foreign_key: true
end
end

View file

@ -0,0 +1,6 @@
class AddQuickFieldsToSuccessCriterion < ActiveRecord::Migration[7.2]
def change
add_reference :success_criteria, :check, null: true, foreign_key: true
add_column :success_criteria, :priority, :integer
end
end

View file

@ -0,0 +1,5 @@
class RemovePathFromElements < ActiveRecord::Migration[7.2]
def change
remove_column :elements, :path, :string
end
end

25
db/schema.rb generated
View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
ActiveRecord::Schema[7.2].define(version: 2024_10_31_183755) do
create_table "account_remember_keys", force: :cascade do |t|
t.string "key", null: false
t.datetime "deadline", null: false
@ -120,12 +120,12 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
end
create_table "elements", force: :cascade do |t|
t.integer "report_id", null: false
t.string "path"
t.string "title"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["report_id"], name: "index_elements_on_report_id"
t.integer "page_id", null: false
t.integer "position", default: 0, null: false
t.index ["page_id"], name: "index_elements_on_page_id"
end
create_table "link_categories", force: :cascade do |t|
@ -146,6 +146,16 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
t.index ["link_category_id"], name: "index_links_on_link_category_id"
end
create_table "pages", force: :cascade do |t|
t.integer "position"
t.string "path"
t.string "url"
t.integer "report_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["report_id"], name: "index_pages_on_report_id"
end
create_table "principles", force: :cascade do |t|
t.string "name_de"
t.string "name_en"
@ -176,6 +186,9 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
t.integer "result"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "check_id"
t.integer "priority"
t.index ["check_id"], name: "index_success_criteria_on_check_id"
t.index ["element_id"], name: "index_success_criteria_on_element_id"
end
@ -185,7 +198,9 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
add_foreign_key "checklist_entries", "checklists"
add_foreign_key "checklist_entries", "checks"
add_foreign_key "checks", "principles"
add_foreign_key "elements", "reports"
add_foreign_key "elements", "pages"
add_foreign_key "links", "link_categories"
add_foreign_key "pages", "reports"
add_foreign_key "success_criteria", "checks"
add_foreign_key "success_criteria", "elements"
end