251 lines
9.2 KiB
Ruby
Generated
251 lines
9.2 KiB
Ruby
Generated
# This file is auto-generated from the current state of the database. Instead
|
|
# of editing this file, please use the migrations feature of Active Record to
|
|
# incrementally modify your database, and then regenerate this schema definition.
|
|
#
|
|
# This file is the source Rails uses to define your schema when running `bin/rails
|
|
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
|
# be faster and is potentially less error prone than running all of your
|
|
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
# migrations use external dependencies or application code.
|
|
#
|
|
# It's strongly recommended that you check this file into your version control system.
|
|
|
|
ActiveRecord::Schema[8.0].define(version: 2025_01_01_171836) do
|
|
create_table "account_remember_keys", force: :cascade do |t|
|
|
t.string "key", null: false
|
|
t.datetime "deadline", null: false
|
|
end
|
|
|
|
create_table "accounts", force: :cascade do |t|
|
|
t.integer "status", default: 1, null: false
|
|
t.string "email", null: false
|
|
t.string "password_hash"
|
|
t.index ["email"], name: "index_accounts_on_email", unique: true, where: "status IN (1, 2)"
|
|
end
|
|
|
|
create_table "action_text_rich_texts", force: :cascade do |t|
|
|
t.string "name", null: false
|
|
t.text "body"
|
|
t.string "record_type", null: false
|
|
t.bigint "record_id", null: false
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.text "body_text"
|
|
t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true
|
|
end
|
|
|
|
create_table "active_storage_attachments", force: :cascade do |t|
|
|
t.string "name", null: false
|
|
t.string "record_type", null: false
|
|
t.bigint "record_id", null: false
|
|
t.bigint "blob_id", null: false
|
|
t.datetime "created_at", null: false
|
|
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
|
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
|
end
|
|
|
|
create_table "active_storage_blobs", force: :cascade do |t|
|
|
t.string "key", null: false
|
|
t.string "filename", null: false
|
|
t.string "content_type"
|
|
t.text "metadata"
|
|
t.string "service_name", null: false
|
|
t.bigint "byte_size", null: false
|
|
t.string "checksum"
|
|
t.datetime "created_at", null: false
|
|
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
|
end
|
|
|
|
create_table "active_storage_variant_records", force: :cascade do |t|
|
|
t.bigint "blob_id", null: false
|
|
t.string "variation_digest", null: false
|
|
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
|
|
end
|
|
|
|
create_table "checklist_entries", force: :cascade do |t|
|
|
t.integer "checklist_id", null: false
|
|
t.integer "check_id", null: false
|
|
t.integer "position"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.index ["check_id"], name: "index_checklist_entries_on_check_id"
|
|
t.index ["checklist_id"], name: "index_checklist_entries_on_checklist_id"
|
|
end
|
|
|
|
create_table "checklists", force: :cascade do |t|
|
|
t.string "code"
|
|
t.string "name"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
end
|
|
|
|
create_table "checks", force: :cascade do |t|
|
|
t.string "position"
|
|
t.string "name"
|
|
t.integer "level"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.bigint "number", null: false
|
|
t.string "name_de"
|
|
t.string "name_en"
|
|
t.boolean "visual", default: false, null: false
|
|
t.boolean "auditory", default: false, null: false
|
|
t.boolean "physical", default: false, null: false
|
|
t.boolean "cognitive", default: false, null: false
|
|
t.boolean "applicable_to_web", default: false, null: false
|
|
t.boolean "applicable_to_app", default: false, null: false
|
|
t.integer "conformity_level"
|
|
t.integer "priority"
|
|
t.boolean "manual_test", default: true, null: false
|
|
t.string "test_url"
|
|
t.string "external_url"
|
|
t.boolean "applicable_to_analogue", default: false, null: false
|
|
t.boolean "applicable_to_document", default: false, null: false
|
|
t.boolean "applicable_to_non_web", default: false, null: false
|
|
t.integer "external_number_1"
|
|
t.integer "external_number_2"
|
|
t.integer "external_number_3"
|
|
t.integer "guideline_id", null: false
|
|
t.index ["guideline_id"], name: "index_checks_on_guideline_id"
|
|
end
|
|
|
|
create_table "checks_links", id: false, force: :cascade do |t|
|
|
t.integer "check_id", null: false
|
|
t.integer "link_id", null: false
|
|
end
|
|
|
|
create_table "checks_standards", id: false, force: :cascade do |t|
|
|
t.integer "check_id", null: false
|
|
t.integer "standard_id", null: false
|
|
t.index ["check_id", "standard_id"], name: "index_checks_standards_on_check_id_and_standard_id", unique: true
|
|
end
|
|
|
|
create_table "elements", force: :cascade do |t|
|
|
t.string "title"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.integer "page_id", null: false
|
|
t.integer "position", null: false
|
|
t.index ["page_id", "position"], name: "index_elements_on_page_id_and_position", unique: true
|
|
t.index ["page_id"], name: "index_elements_on_page_id"
|
|
end
|
|
|
|
create_table "guidelines", force: :cascade do |t|
|
|
t.integer "principle_id", null: false
|
|
t.integer "number"
|
|
t.string "name_de"
|
|
t.string "name_en"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.index ["principle_id"], name: "index_guidelines_on_principle_id"
|
|
end
|
|
|
|
create_table "link_categories", force: :cascade do |t|
|
|
t.string "name"
|
|
t.text "description"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
end
|
|
|
|
create_table "links", force: :cascade do |t|
|
|
t.string "url"
|
|
t.string "text"
|
|
t.datetime "last_check_at"
|
|
t.integer "fail_count", default: 0, null: false
|
|
t.integer "link_category_id", null: false
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
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.text "notes"
|
|
t.index ["report_id", "position"], name: "index_pages_on_report_id_and_position", unique: true
|
|
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"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
end
|
|
|
|
create_table "projects", force: :cascade do |t|
|
|
t.string "name"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
end
|
|
|
|
create_table "reports", force: :cascade do |t|
|
|
t.string "name"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.string "url"
|
|
t.integer "project_id"
|
|
t.index ["project_id"], name: "index_reports_on_project_id"
|
|
end
|
|
|
|
create_table "sessions", force: :cascade do |t|
|
|
t.integer "user_id", null: false
|
|
t.string "ip_address"
|
|
t.string "user_agent"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.index ["user_id"], name: "index_sessions_on_user_id"
|
|
end
|
|
|
|
create_table "standards", force: :cascade do |t|
|
|
t.string "name_de"
|
|
t.string "name_en"
|
|
t.string "version"
|
|
t.string "url_de"
|
|
t.string "url_en"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
end
|
|
|
|
create_table "success_criteria", force: :cascade do |t|
|
|
t.integer "element_id", null: false
|
|
t.string "title"
|
|
t.integer "level"
|
|
t.integer "result"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.integer "check_id"
|
|
t.integer "priority"
|
|
t.integer "position", null: false
|
|
t.index ["check_id"], name: "index_success_criteria_on_check_id"
|
|
t.index ["element_id", "position"], name: "index_success_criteria_on_element_id_and_position", unique: true
|
|
t.index ["element_id"], name: "index_success_criteria_on_element_id"
|
|
end
|
|
|
|
create_table "users", force: :cascade do |t|
|
|
t.string "email_address", null: false
|
|
t.string "password_digest", null: false
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.index ["email_address"], name: "index_users_on_email_address", unique: true
|
|
end
|
|
|
|
add_foreign_key "account_remember_keys", "accounts", column: "id"
|
|
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
|
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
|
add_foreign_key "checklist_entries", "checklists"
|
|
add_foreign_key "checklist_entries", "checks"
|
|
add_foreign_key "checks", "guidelines"
|
|
add_foreign_key "elements", "pages"
|
|
add_foreign_key "guidelines", "principles"
|
|
add_foreign_key "links", "link_categories"
|
|
add_foreign_key "pages", "reports"
|
|
add_foreign_key "reports", "projects"
|
|
add_foreign_key "sessions", "users"
|
|
add_foreign_key "success_criteria", "checks"
|
|
add_foreign_key "success_criteria", "elements"
|
|
end
|