# 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.define(version: 2019_05_13_103739) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "friendly_id_slugs", id: :serial, force: :cascade do |t| t.string "slug", null: false t.integer "sluggable_id", null: false t.string "sluggable_type", limit: 50 t.string "scope" t.datetime "created_at" t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type" t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id" t.index ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type" end create_table "spina_accounts", id: :serial, force: :cascade do |t| t.string "name" t.string "address" t.string "postal_code" t.string "city" t.string "phone" t.string "email" t.text "preferences" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.boolean "robots_allowed", default: false end create_table "spina_attachment_collections", id: :serial, force: :cascade do |t| t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "spina_attachment_collections_attachments", id: :serial, force: :cascade do |t| t.integer "attachment_collection_id" t.integer "attachment_id" end create_table "spina_attachments", id: :serial, force: :cascade do |t| t.string "file" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "spina_blog_categories", id: :serial, force: :cascade do |t| t.string "name" t.string "slug" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["slug"], name: "index_spina_blog_categories_on_slug" end create_table "spina_blog_posts", id: :serial, force: :cascade do |t| t.string "title" t.text "excerpt" t.text "content" t.integer "image_id" t.boolean "draft" t.datetime "published_at" t.string "slug" t.integer "user_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "category_id" t.boolean "featured", default: false t.string "seo_title" t.text "description" t.index ["category_id"], name: "index_spina_blog_posts_on_category_id" t.index ["image_id"], name: "index_spina_blog_posts_on_image_id" t.index ["slug"], name: "index_spina_blog_posts_on_slug" t.index ["user_id"], name: "index_spina_blog_posts_on_user_id" end create_table "spina_image_collections", force: :cascade do |t| t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "spina_image_collections_images", id: :serial, force: :cascade do |t| t.integer "image_collection_id" t.integer "image_id" t.integer "position" t.index ["image_collection_id"], name: "index_spina_image_collections_images_on_image_collection_id" t.index ["image_id"], name: "index_spina_image_collections_images_on_image_id" end create_table "spina_images", force: :cascade do |t| t.integer "media_folder_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["media_folder_id"], name: "index_spina_images_on_media_folder_id" end create_table "spina_layout_parts", id: :serial, force: :cascade do |t| t.string "title" t.string "name" t.integer "layout_partable_id" t.string "layout_partable_type" t.datetime "created_at" t.datetime "updated_at" t.integer "account_id" end create_table "spina_line_translations", id: :serial, force: :cascade do |t| t.integer "spina_line_id", null: false t.string "locale", null: false t.string "content" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["locale"], name: "index_spina_line_translations_on_locale" t.index ["spina_line_id"], name: "index_spina_line_translations_on_spina_line_id" end create_table "spina_lines", id: :serial, force: :cascade do |t| t.datetime "created_at" t.datetime "updated_at" end create_table "spina_media_folders", force: :cascade do |t| t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "spina_navigation_items", id: :serial, force: :cascade do |t| t.integer "page_id", null: false t.integer "navigation_id", null: false t.integer "position", default: 0, null: false t.string "ancestry" t.datetime "created_at" t.datetime "updated_at" t.index ["page_id", "navigation_id"], name: "index_spina_navigation_items_on_page_id_and_navigation_id", unique: true end create_table "spina_navigations", id: :serial, force: :cascade do |t| t.string "name", null: false t.string "label", null: false t.boolean "auto_add_pages", default: false, null: false t.integer "position", default: 0, null: false t.datetime "created_at" t.datetime "updated_at" t.index ["name"], name: "index_spina_navigations_on_name", unique: true end create_table "spina_options", id: :serial, force: :cascade do |t| t.string "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "spina_page_parts", id: :serial, force: :cascade do |t| t.string "title" t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "page_id" t.integer "page_partable_id" t.string "page_partable_type" end create_table "spina_page_translations", id: :serial, force: :cascade do |t| t.integer "spina_page_id", null: false t.string "locale", null: false t.string "title" t.string "menu_title" t.string "description" t.string "seo_title" t.string "materialized_path" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["locale"], name: "index_spina_page_translations_on_locale" t.index ["spina_page_id"], name: "index_spina_page_translations_on_spina_page_id" end create_table "spina_pages", id: :serial, force: :cascade do |t| t.boolean "show_in_menu", default: true t.string "slug" t.boolean "deletable", default: true t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "name" t.boolean "skip_to_first_child", default: false t.string "view_template" t.string "layout_template" t.boolean "draft", default: false t.string "link_url" t.string "ancestry" t.integer "position" t.boolean "active", default: true t.integer "resource_id" t.index ["resource_id"], name: "index_spina_pages_on_resource_id" end create_table "spina_resources", force: :cascade do |t| t.string "name", null: false t.string "label" t.string "view_template" t.integer "parent_page_id" t.string "order_by" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["parent_page_id"], name: "index_spina_resources_on_parent_page_id" end create_table "spina_rewrite_rules", id: :serial, force: :cascade do |t| t.string "old_path" t.string "new_path" t.datetime "created_at" t.datetime "updated_at" end create_table "spina_settings", id: :serial, force: :cascade do |t| t.string "plugin" t.jsonb "preferences", default: {} t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["plugin"], name: "index_spina_settings_on_plugin" end create_table "spina_structure_items", id: :serial, force: :cascade do |t| t.integer "structure_id" t.integer "position" t.datetime "created_at" t.datetime "updated_at" t.index ["structure_id"], name: "index_spina_structure_items_on_structure_id" end create_table "spina_structure_parts", id: :serial, force: :cascade do |t| t.integer "structure_item_id" t.integer "structure_partable_id" t.string "structure_partable_type" t.string "name" t.string "title" t.datetime "created_at" t.datetime "updated_at" t.index ["structure_item_id"], name: "index_spina_structure_parts_on_structure_item_id" t.index ["structure_partable_id"], name: "index_spina_structure_parts_on_structure_partable_id" end create_table "spina_structures", id: :serial, force: :cascade do |t| t.datetime "created_at" t.datetime "updated_at" end create_table "spina_text_translations", id: :serial, force: :cascade do |t| t.integer "spina_text_id", null: false t.string "locale", null: false t.text "content" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["locale"], name: "index_spina_text_translations_on_locale" t.index ["spina_text_id"], name: "index_spina_text_translations_on_spina_text_id" end create_table "spina_texts", id: :serial, force: :cascade do |t| t.datetime "created_at" t.datetime "updated_at" end create_table "spina_users", id: :serial, force: :cascade do |t| t.string "name" t.string "email" t.string "password_digest" t.boolean "admin", default: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.datetime "last_logged_in" t.string "password_reset_token" t.datetime "password_reset_sent_at" end add_foreign_key "spina_blog_posts", "spina_images", column: "image_id" add_foreign_key "spina_blog_posts", "spina_users", column: "user_id" end