start of iteration 2
This commit is contained in:
parent
9fb87a74ce
commit
729ed13521
75 changed files with 705 additions and 170 deletions
12
db/migrate/20241030230805_create_pages.rb
Normal file
12
db/migrate/20241030230805_create_pages.rb
Normal 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
|
||||
6
db/migrate/20241030231244_add_page_id_to_elements.rb
Normal file
6
db/migrate/20241030231244_add_page_id_to_elements.rb
Normal 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
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class RemoveReportIdFromElements < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
remove_reference :elements, :report, null: false, foreign_key: true
|
||||
end
|
||||
end
|
||||
|
|
@ -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
|
||||
5
db/migrate/20241031183755_remove_path_from_elements.rb
Normal file
5
db/migrate/20241031183755_remove_path_from_elements.rb
Normal 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
25
db/schema.rb
generated
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue