Skip to content
Snippets Groups Projects
schema.rb 53.5 KiB
Newer Older
Arnaud Levy's avatar
Arnaud Levy committed
# 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.

Arnaud Levy's avatar
Arnaud Levy committed
ActiveRecord::Schema[7.0].define(version: 2023_04_05_142031) do
Arnaud Levy's avatar
Arnaud Levy committed
  # These are extensions that must be enabled in order to support this database
  enable_extension "pgcrypto"
  enable_extension "plpgsql"
Sébastien Gaya's avatar
Sébastien Gaya committed
  enable_extension "unaccent"
Arnaud Levy's avatar
Arnaud Levy committed

Olivia206's avatar
Olivia206 committed
  create_table "action_text_rich_texts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.string "name", null: false
    t.text "body"
    t.string "record_type", null: false
    t.uuid "record_id", null: false
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true
  end

Olivia206's avatar
Olivia206 committed
  create_table "active_storage_attachments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
Arnaud Levy's avatar
Arnaud Levy committed
    t.string "name", null: false
    t.string "record_type", null: false
    t.uuid "record_id", null: false
    t.uuid "blob_id", null: false
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.datetime "created_at", precision: nil, null: false
Arnaud Levy's avatar
Arnaud Levy committed
    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

Olivia206's avatar
Olivia206 committed
  create_table "active_storage_blobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
Arnaud Levy's avatar
Arnaud Levy committed
    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
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.string "checksum"
    t.datetime "created_at", precision: nil, null: false
pabois's avatar
pabois committed
    t.uuid "university_id"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
pabois's avatar
pabois committed
    t.index ["university_id"], name: "index_active_storage_blobs_on_university_id"
Arnaud Levy's avatar
Arnaud Levy committed
  end

Olivia206's avatar
Olivia206 committed
  create_table "active_storage_variant_records", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
Arnaud Levy's avatar
Arnaud Levy committed
    t.uuid "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

Olivia206's avatar
Olivia206 committed
  create_table "administration_qualiopi_criterions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
Arnaud Levy's avatar
Arnaud Levy committed
    t.integer "number"
    t.text "name"
    t.text "description"
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Arnaud Levy's avatar
Arnaud Levy committed
  end

Olivia206's avatar
Olivia206 committed
  create_table "administration_qualiopi_indicators", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
Arnaud Levy's avatar
Arnaud Levy committed
    t.uuid "criterion_id", null: false
    t.integer "number"
    t.text "name"
    t.text "level_expected"
    t.text "proof"
    t.text "requirement"
    t.text "non_conformity"
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Arnaud Levy's avatar
Arnaud Levy committed
    t.text "glossary"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["criterion_id"], name: "index_administration_qualiopi_indicators_on_criterion_id"
Arnaud Levy's avatar
Arnaud Levy committed
  end

Olivia206's avatar
Olivia206 committed
  create_table "communication_blocks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
Arnaud Levy's avatar
Arnaud Levy committed
    t.uuid "university_id", null: false
    t.string "about_type"
    t.uuid "about_id"
Arnaud Levy's avatar
Arnaud Levy committed
    t.integer "template_kind", default: 0, null: false
Arnaud Levy's avatar
Arnaud Levy committed
    t.jsonb "data"
    t.integer "position", default: 0, null: false
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.string "title"
Arnaud Levy's avatar
Arnaud Levy committed
    t.boolean "published", default: true
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["about_type", "about_id"], name: "index_communication_website_blocks_on_about"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["university_id"], name: "index_communication_blocks_on_university_id"
Arnaud Levy's avatar
Arnaud Levy committed
  end

Arnaud Levy's avatar
Arnaud Levy committed
  create_table "communication_extranet_connections", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
    t.uuid "university_id", null: false
    t.uuid "extranet_id", null: false
    t.string "object_type"
    t.uuid "object_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["extranet_id"], name: "index_communication_extranet_connections_on_extranet_id"
    t.index ["object_type", "object_id"], name: "index_communication_extranet_connections_on_object"
    t.index ["university_id"], name: "index_communication_extranet_connections_on_university_id"
  end

Arnaud Levy's avatar
Arnaud Levy committed
  create_table "communication_extranet_document_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
    t.uuid "extranet_id", null: false
    t.uuid "university_id", null: false
    t.string "name"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Arnaud Levy's avatar
Arnaud Levy committed
    t.string "slug"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["extranet_id"], name: "index_communication_extranet_document_categories_on_extranet_id"
    t.index ["university_id"], name: "extranet_document_categories_universities"
  end

  create_table "communication_extranet_document_kinds", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
    t.uuid "extranet_id", null: false
    t.uuid "university_id", null: false
    t.string "name"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Arnaud Levy's avatar
Arnaud Levy committed
    t.string "slug"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["extranet_id"], name: "index_communication_extranet_document_kinds_on_extranet_id"
    t.index ["university_id"], name: "extranet_document_kinds_universities"
  end

Arnaud Levy's avatar
Arnaud Levy committed
  create_table "communication_extranet_documents", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
Arnaud Levy's avatar
Arnaud Levy committed
    t.string "name"
    t.uuid "university_id", null: false
    t.uuid "extranet_id", null: false
    t.boolean "published"
    t.datetime "published_at"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Arnaud Levy's avatar
Arnaud Levy committed
    t.uuid "kind_id"
    t.uuid "category_id"
    t.index ["category_id"], name: "extranet_document_categories"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["extranet_id"], name: "index_communication_extranet_documents_on_extranet_id"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["kind_id"], name: "index_extranet_document_kinds"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["university_id"], name: "index_communication_extranet_documents_on_university_id"
Arnaud Levy's avatar
Arnaud Levy committed
  end

Arnaud Levy's avatar
Arnaud Levy committed
  create_table "communication_extranet_post_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
    t.string "name"
    t.string "slug"
    t.uuid "extranet_id", null: false
    t.uuid "university_id", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["extranet_id"], name: "index_communication_extranet_post_categories_on_extranet_id"
    t.index ["university_id"], name: "index_communication_extranet_post_categories_on_university_id"
  end

Arnaud Levy's avatar
Arnaud Levy committed
  create_table "communication_extranet_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
    t.string "title"
    t.boolean "published", default: false
    t.datetime "published_at"
    t.uuid "author_id"
    t.uuid "extranet_id", null: false
    t.uuid "university_id", null: false
    t.string "featured_image_alt"
    t.text "featured_image_credit"
    t.string "slug"
    t.text "summary"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
Arnaud Levy's avatar
Arnaud Levy committed
    t.uuid "category_id"
Arnaud Levy's avatar
Arnaud Levy committed
    t.boolean "pinned", default: false
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["author_id"], name: "index_communication_extranet_posts_on_author_id"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["category_id"], name: "index_communication_extranet_posts_on_category_id"
Arnaud Levy's avatar
Arnaud Levy committed
    t.index ["extranet_id"], name: "index_communication_extranet_posts_on_extranet_id"
    t.index ["university_id"], name: "index_communication_extranet_posts_on_university_id"
  end

Olivia206's avatar
Olivia206 committed
  create_table "communication_extranets", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
Arnaud Levy's avatar
Arnaud Levy committed
    t.string "name"
    t.uuid "university_id", null: false
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
pabois's avatar
pabois committed
    t.string "about_type"
    t.uuid "about_id"
pabois's avatar
pabois committed
    t.string "registration_contact"
pabois's avatar
pabois committed
    t.boolean "has_sso", default: false
    t.text "sso_cert"
    t.jsonb "sso_mapping"
    t.string "sso_name_identifier_format"
    t.integer "sso_provider", default: 0
pabois's avatar
pabois committed
    t.string "sso_target_url"
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.text "terms"
    t.text "privacy_policy"
    t.text "cookies_policy"
    t.string "color"
Sébastien Gaya's avatar
Sébastien Gaya committed
    t.string "sso_button_label"
Arnaud Levy's avatar
Arnaud Levy committed
    t.boolean "feature_alumni", default: false
Arnaud Levy's avatar
Arnaud Levy committed
    t.boolean "feature_contacts", default: false
Arnaud Levy's avatar
Arnaud Levy committed
    t.boolean "feature_library", default: false
Loading
Loading full blame...