# 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 `rails # db:schema:load`. When creating a new database, `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_06_092123) do create_table "admin_admin_roles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "admin_id" t.integer "admin_role_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["admin_id"], name: "index_admin_admin_roles_on_admin_id" t.index ["admin_role_id"], name: "index_admin_admin_roles_on_admin_role_id" end create_table "admin_permission_admin_roles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "admin_permission_id" t.integer "admin_role_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["admin_permission_id"], name: "index_admin_permission_admin_roles_on_admin_permission_id" t.index ["admin_role_id"], name: "index_admin_permission_admin_roles_on_admin_role_id" end create_table "admin_permissions", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "admin_roles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "admins", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "firstname" t.string "avatar" t.string "username", default: "", null: false t.string "email", default: "", null: false t.string "password_digest", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" t.integer "sign_in_count", default: 0 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.string "remember_token" t.boolean "super_admin" t.datetime "created_at" t.datetime "updated_at" end create_table "albums", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.boolean "super_admin" t.datetime "created_at" t.datetime "updated_at" end create_table "article_authors", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.text "description" t.boolean "enabled" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "title" t.string "url" end create_table "articleindexs_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "category_id" t.string "style" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["category_id"], name: "index_articleindexs_contents_on_category_id" end create_table "articles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.datetime "published_at" t.string "title" t.string "slug" t.string "tag" t.text "description" t.text "keywords" t.boolean "enabled" t.integer "image_file_id" t.boolean "title_cached" t.string "tags_cache" t.string "tags_cache_slug" t.integer "category_id" t.datetime "created_at" t.datetime "updated_at" t.string "thumb_style" t.boolean "commentable" t.boolean "show_comments" t.integer "title_bottom" t.boolean "gradient_cached" t.integer "article_author_id" t.integer "without_text_image_file_id" t.index ["article_author_id"], name: "index_articles_on_article_author_id" end create_table "block_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "style" t.integer "nbr_columns" t.integer "row1" t.integer "row2" t.integer "row3" t.integer "row4" t.datetime "created_at" t.datetime "updated_at" t.integer "image_file_id" t.integer "margin_top" t.integer "margin_bottom" t.integer "margin_left" t.integer "margin_right" t.integer "padding_top" t.integer "padding_bottom" t.integer "padding_left" t.integer "padding_right" t.boolean "parallax" t.boolean "center" t.integer "center_width" t.string "background_color" t.string "gradient_start" t.string "gradient_stop" t.index ["image_file_id"], name: "index_block_contents_on_image_file_id" end create_table "blocks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "lang_site_id" t.string "block_name" t.string "blockable_type" t.integer "blockable_id" t.text "content" t.datetime "created_at" t.datetime "updated_at" end create_table "break_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.boolean "line" t.integer "height" t.string "style" t.datetime "created_at" t.datetime "updated_at" end create_table "categories", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "slug" t.boolean "enabled" t.text "description" t.integer "image_file_id" t.integer "position" t.integer "parent_id" t.string "permalink" t.boolean "front_page" t.datetime "created_at" t.datetime "updated_at" end create_table "category_categoryables", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "category_id" t.string "categoryable_type" t.integer "categoryable_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["category_id"], name: "index_category_categoryables_on_category_id" end create_table "category_langs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "slug" t.text "description" t.integer "image_file_id" t.integer "lang_site_id" t.integer "category_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["category_id"], name: "index_category_langs_on_category_id" t.index ["lang_site_id"], name: "index_category_langs_on_lang_site_id" end create_table "cel_tables", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "position" t.integer "style" t.integer "table_row_id" t.integer "table_content_id" t.datetime "created_at" t.datetime "updated_at" end create_table "comments", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "pseudo", default: "" t.string "email", default: "" t.string "website", default: "" t.boolean "enabled" t.text "comment" t.integer "commentable_id" t.string "commentable_type" t.integer "user_id" t.datetime "created_at" t.datetime "updated_at" t.integer "parent_id" t.boolean "notified", default: false t.datetime "notified_at" t.integer "lang_site_id", default: 1 end create_table "contacts", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "civilite" t.string "firstname" t.string "name" t.string "address" t.string "address2" t.string "cp" t.string "city" t.string "country" t.string "phone" t.string "token" t.string "email" t.string "website" t.integer "raison_id" t.text "message" t.datetime "created_at" t.datetime "updated_at" t.text "notes" t.integer "survey_set_id" t.string "raison_text" t.text "objet" end create_table "data_file_categories", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "slug" t.integer "parent_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "data_file_passwords", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "data_file_id" t.string "token" t.text "description" t.integer "nbr_downloads" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["data_file_id"], name: "index_data_file_passwords_on_data_file_id" end create_table "data_files", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "file" t.string "name" t.string "slug" t.string "token" t.string "description" t.integer "file_folder_id" t.datetime "created_at" t.datetime "updated_at" t.string "title" t.text "long_desc" t.boolean "boutique" t.integer "data_file_category_id" t.integer "image_file_id" t.text "yumpu_content" t.boolean "show_yumpu" t.integer "square_image_file_id" t.boolean "order_link" t.boolean "download_link" t.index ["image_file_id"], name: "index_data_files_on_image_file_id" end create_table "download_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "title" t.string "style" t.text "description" t.integer "data_file_id" t.datetime "created_at" t.datetime "updated_at" t.boolean "boutique" t.boolean "show_yumpu" end create_table "dynamic_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.datetime "created_at" t.datetime "updated_at" end create_table "edit_watchers", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "element_type" t.integer "element_id" t.string "key" t.integer "admin_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["admin_id"], name: "index_edit_watchers_on_admin_id" end create_table "external_links", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "title" t.text "description" t.string "url" t.datetime "created_at" t.datetime "updated_at" end create_table "file_folders", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.boolean "super_admin" t.datetime "created_at" t.datetime "updated_at" end create_table "gallery_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.text "description" t.integer "style" t.integer "nbr_img" t.datetime "created_at" t.datetime "updated_at" t.boolean "with_legend", default: false end create_table "gallery_images", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "title" t.text "description" t.string "tags" t.integer "position" t.integer "image_file_id" t.integer "gallery_content_id" t.datetime "created_at" t.datetime "updated_at" end create_table "hashtaggings", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "hashtag_id" t.integer "hashtaggable_id" t.string "hashtaggable_type" t.integer "lang_site_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["hashtag_id"], name: "index_hashtaggings_on_hashtag_id" end create_table "hashtags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.boolean "enabled" t.integer "lang_site_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "slug" end create_table "home_slide_langs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "home_slider_slide_id" t.integer "lang_site_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["home_slider_slide_id"], name: "index_home_slide_langs_on_home_slider_slide_id" t.index ["lang_site_id"], name: "index_home_slide_langs_on_lang_site_id" end create_table "home_slider_slides", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "home_slider_id" t.integer "position" t.datetime "start_at" t.datetime "end_at" t.integer "image_file_id" t.boolean "enabled" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "url" t.integer "blur_image_id" t.string "blur_color" t.string "titre1" t.string "titre2" t.text "description1" t.text "description2" t.boolean "popup" t.string "cta_text" t.integer "article_id" t.index ["home_slider_id"], name: "index_home_slider_slides_on_home_slider_id" end create_table "home_sliders", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "slug" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "html_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.text "content" t.string "style" t.string "content_type" t.datetime "created_at" t.datetime "updated_at" end create_table "image_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "image_file_id" t.integer "width" t.integer "height" t.string "alignement" t.boolean "expandable" t.string "style" t.string "alt" t.integer "cible_id" t.string "cible_type" t.boolean "with_cible" t.boolean "popup" t.datetime "created_at" t.datetime "updated_at" t.integer "margin_top" t.integer "margin_left" t.integer "margin_right" t.integer "margin_bottom" t.boolean "with_legend", default: false end create_table "image_files", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "file" t.string "name" t.string "slug" t.text "description" t.string "tags" t.integer "album_id" t.string "photograph" t.string "cible_type" t.integer "cible_id" t.datetime "created_at" t.datetime "updated_at" t.string "origin_name" t.string "token_s" end create_table "lang_articles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.datetime "published_at" t.string "title" t.string "slug" t.text "description" t.text "keywords" t.boolean "enabled" t.integer "image_file_id" t.boolean "title_cached" t.string "tags_cache" t.string "tags_cache_slug" t.integer "lang_site_id" t.integer "article_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "html_title" t.string "fb_title" t.string "twitter_title" t.text "twitter_description" t.integer "without_text_image_file_id" t.integer "slider_image_file_id" t.text "chapeau" end create_table "lang_pages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "lang_site_id" t.integer "page_id" t.text "title" t.text "description" t.text "keywords" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "twitter_title" t.text "twitter_description" t.integer "without_text_image_file_id" t.index ["lang_site_id"], name: "index_lang_pages_on_lang_site_id" t.index ["page_id"], name: "index_lang_pages_on_page_id" end create_table "lang_sites", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "slug" t.boolean "enabled" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "link_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "type" t.string "name" t.string "title" t.boolean "popup" t.string "url" t.string "style" t.integer "cible_id" t.string "cible_type" t.datetime "created_at" t.datetime "updated_at" end create_table "mail_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "lang_site_id" t.integer "mail_type_id" t.string "subject" t.text "message" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.boolean "enabled" t.string "content_type" t.text "tags" t.integer "mail_template_id" t.index ["lang_site_id"], name: "index_mail_contents_on_lang_site_id" t.index ["mail_template_id"], name: "index_mail_contents_on_mail_template_id" t.index ["mail_type_id"], name: "index_mail_contents_on_mail_type_id" end create_table "mail_profiles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "civilite" t.string "firstname" t.string "name" t.string "address" t.string "address2" t.string "cp" t.string "city" t.string "country" t.string "email" t.string "phone" t.string "token" t.string "provider" t.string "uid" t.string "facebook_token" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "mail_templates", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "title" t.text "template_html" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "mail_types", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "slug" t.string "default_title" t.text "default_message" t.integer "mail_type_reference_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "map_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "address" t.string "name" t.integer "view" t.boolean "info_bule" t.integer "zoom" t.datetime "created_at" t.datetime "updated_at" end create_table "menu_aliases", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "menu_item_id" t.datetime "created_at" t.datetime "updated_at" end create_table "menu_item_articles", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "menu_item_id" t.integer "article_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "menu_item_categories", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "menu_item_id" t.integer "category_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "menu_item_langs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "lang_site_id" t.string "name" t.string "slug" t.string "permalink" t.boolean "enabled" t.boolean "visible" t.integer "menu_item_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "image_file_id" t.index ["image_file_id"], name: "index_menu_item_langs_on_image_file_id" t.index ["lang_site_id"], name: "index_menu_item_langs_on_lang_site_id" end create_table "menu_item_link_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "menu_item_id" t.integer "image_file_id" t.string "title" t.text "description" t.string "url" t.boolean "popup" t.string "style" t.string "block_type" t.integer "cible_id" t.string "cible_type" t.decimal "proportion", precision: 15, scale: 10 t.integer "level" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["image_file_id"], name: "index_menu_item_link_contents_on_image_file_id" t.index ["menu_item_id"], name: "index_menu_item_link_contents_on_menu_item_id" end create_table "menu_item_slug_histories", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "permalink" t.string "locale" t.integer "menu_item_id" t.integer "menu_item_lang_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "menu_item_tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "menu_item_id" t.integer "tag_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "menu_items", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "slug" t.string "permalink" t.integer "image_file_id" t.string "section_name" t.integer "section_id" t.string "repertoire_name" t.integer "repertoire_id" t.integer "parent_id" t.integer "position" t.boolean "super_admin" t.boolean "enabled" t.boolean "visible" t.boolean "deleted" t.integer "menu_id" t.integer "menu_content_id" t.string "menu_content_type" t.integer "archive_id" t.boolean "archived" t.datetime "archived_at" t.boolean "password" t.boolean "comment" t.datetime "created_at" t.datetime "updated_at" t.boolean "sidebar" t.boolean "title_image" t.string "title_image_style" t.boolean "title_cached" t.integer "icon_image_file_id" t.integer "icon_b_image_file_id" t.text "primary_description" t.integer "icon_v_image_file_id" end create_table "menu_urls", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "url" t.datetime "created_at" t.datetime "updated_at" end create_table "menus", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "max_levels" t.string "slug" t.datetime "created_at" t.datetime "updated_at" end create_table "p_bank_accounts", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_bank_id" t.string "iban" t.string "bic" t.string "compta_cpt" t.string "compta_journ" t.string "compta_aux" t.integer "p_fournisseur_id" t.integer "p_customer_id" t.boolean "owner", default: false t.integer "data_file_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["data_file_id"], name: "index_p_bank_accounts_on_data_file_id" t.index ["p_customer_id"], name: "index_p_bank_accounts_on_p_customer_id" t.index ["p_fournisseur_id"], name: "index_p_bank_accounts_on_p_fournisseur_id" end create_table "p_banks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "bic" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_brut_products", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.decimal "price", precision: 13, scale: 5 t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_commercials", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "firstname" t.string "phone" t.string "email" t.string "token" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_compta_elements", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "element_type" t.integer "element_id" t.integer "p_customer_id" t.datetime "date" t.decimal "amount", precision: 13, scale: 2 t.datetime "created_at", null: false t.datetime "updated_at", null: false t.boolean "solde", default: false t.index ["p_customer_id"], name: "index_p_compta_elements_on_p_customer_id" end create_table "p_contacts", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.text "comment" t.string "tel" t.string "email" t.boolean "bc", default: false t.boolean "boolean", default: false t.integer "contactable_id" t.string "contactable_type" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_customer_cats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "code" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "payment_days" t.decimal "encourt_max", precision: 14, scale: 4 end create_table "p_customer_sheets", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_customer_id" t.integer "p_customer_site_id" t.string "state" t.string "comments" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "particular_bill_id" t.integer "particular_send_id" t.date "wish_start" t.date "wish_stop" t.decimal "a_total_cost_ok", precision: 14, scale: 4 t.decimal "a_ok_total", precision: 14, scale: 4 t.boolean "stock_done", default: false t.integer "p_commercial_id" t.boolean "imported", default: false t.string "npiece" t.decimal "a_ok_total_ttc", precision: 14, scale: 4 t.boolean "billed", default: false t.decimal "a_total", precision: 14, scale: 4 t.decimal "a_total_ttc", precision: 14, scale: 4 t.boolean "comptant", default: true t.boolean "acompte", default: false t.decimal "acompte_percent", precision: 10 t.integer "payment_delais" t.boolean "payment_fin_de_mois", default: false t.datetime "paid_start_at" t.boolean "paid", default: false t.datetime "paid_at" t.integer "p_payment_type_id" t.boolean "i_archive", default: false t.string "cust_ref" t.index ["p_customer_id"], name: "index_p_customer_sheets_on_p_customer_id" t.index ["p_customer_site_id"], name: "index_p_customer_sheets_on_p_customer_site_id" end create_table "p_customer_sites", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_customer_id" t.string "name" t.integer "particular_id" t.string "comments" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["p_customer_id"], name: "index_p_customer_sites_on_p_customer_id" t.index ["particular_id"], name: "index_p_customer_sites_on_particular_id" end create_table "p_customers", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.decimal "encourt_max", precision: 12, scale: 4 t.integer "p_customer_cat_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "particular_id" t.string "name" t.integer "code" t.boolean "fav" t.boolean "facture_email" t.boolean "risque" t.integer "admin_id" t.decimal "cache_ca", precision: 14, scale: 4 t.decimal "cache_encours", precision: 14, scale: 4 t.integer "cache_moyenne_paiement" t.integer "payment_days" t.integer "parent_id" t.string "mlm_token" t.string "parent_code" t.boolean "parent_at_create", default: false t.boolean "imported", default: false t.boolean "facture_mail", default: false t.decimal "cache_encours_th", precision: 12, scale: 2 t.decimal "cache_payments_th", precision: 12, scale: 2 t.decimal "cache_payments", precision: 12, scale: 2 t.decimal "cache_payments_tot", precision: 12, scale: 2 t.integer "p_payment_type_id" t.boolean "comptant", default: true t.boolean "acompte", default: false t.decimal "acompte_percent", precision: 10 t.integer "payment_delais" t.boolean "payment_fin_de_mois", default: false t.string "i_actif" t.boolean "i_cat", default: false t.decimal "cache_ca_ttc", precision: 13, scale: 2 t.integer "p_commercial_id" t.index ["p_commercial_id"], name: "index_p_customers_on_p_commercial_id" t.index ["particular_id"], name: "index_p_customers_on_particular_id" end create_table "p_document_types", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "prefix" t.string "label" t.string "affix" t.text "header" t.text "footer" t.integer "image_file_id" t.integer "data_file_id" t.string "class_type" t.string "sub_type" t.string "name" t.boolean "enabled", default: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "position" end create_table "p_documents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "element_type" t.integer "element_id" t.integer "p_document_type_id" t.integer "particular_bill_id" t.integer "particular_send_id" t.string "name" t.string "d_number" t.integer "d_index" t.integer "d_year" t.string "d_prefix" t.string "label" t.text "header" t.text "footer" t.integer "image_file_id" t.integer "data_file_id" t.string "token" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "p_sheet_line_id" t.string "bl_type" t.decimal "cache_total_ht", precision: 14, scale: 4 t.decimal "cache_total_ttc", precision: 14, scale: 4 t.decimal "cache_tva", precision: 14, scale: 4 t.integer "payment_days" t.datetime "cache_exp_date" t.integer "p_customer_id" t.boolean "theo_paid", default: false t.datetime "theo_paid_at" t.boolean "paid", default: false t.datetime "paid_at" t.boolean "imported", default: false t.decimal "cache_to_paid", precision: 12, scale: 2 t.decimal "cache_to_th_paid", precision: 12, scale: 2 t.decimal "cache_total_tva", precision: 12, scale: 2 t.decimal "acompte_percent", precision: 10, scale: 2 t.decimal "acompte_value", precision: 10, scale: 2 t.boolean "comptant", default: true t.boolean "acompte", default: false t.integer "payment_delais" t.boolean "payment_fin_de_mois", default: false t.integer "p_payment_type_id" t.integer "p_ship_tour_truck_id" t.boolean "canceled", default: false t.boolean "i_archive", default: false t.string "cust_ref" t.integer "doc_ref_id" t.date "echeance_date" t.text "avoir_text" t.string "doc_ref_number" t.boolean "i_ajust", default: false t.boolean "i_ajust_result", default: false t.integer "p_commercial_id" t.index ["p_commercial_id"], name: "index_p_documents_on_p_commercial_id" t.index ["p_document_type_id"], name: "index_p_documents_on_p_document_type_id" end create_table "p_drivers", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.boolean "enabled", default: true t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_fournisseur_orders", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "ref" t.decimal "amount", precision: 12, scale: 4 t.datetime "enter_date" t.integer "p_fournisseur_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.decimal "a_ok_total_ttc", precision: 14, scale: 2 t.decimal "a_ok_total_ht", precision: 14, scale: 2 t.decimal "a_ok_tva", precision: 14, scale: 2 t.decimal "a_total_ttc", precision: 14, scale: 2 t.decimal "a_total_ht", precision: 14, scale: 2 t.decimal "a_tva", precision: 14, scale: 2 end create_table "p_fournisseurs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "code" t.string "address1" t.string "address2" t.string "cp" t.string "city" t.string "country" t.string "email" t.string "tel" t.string "compta_account" end create_table "p_payment_documents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_payment_id" t.integer "p_document_id" t.decimal "amount", precision: 14, scale: 4 t.boolean "paid", default: false t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_payment_types", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "code" t.boolean "enabled" t.boolean "comptant" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "signe" end create_table "p_payments", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.datetime "paid_at" t.datetime "theo_date" t.integer "p_payment_type_id" t.decimal "amount", precision: 14, scale: 4 t.string "number" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "p_customer_id" t.boolean "paid", default: false t.boolean "canceled", default: false t.boolean "affected", default: false t.integer "p_ship_tour_truck_sheet_line_id" t.integer "p_sheet_line_id" t.boolean "imported", default: false t.string "label" t.string "piece" t.boolean "i_archive", default: false t.boolean "remise", default: false t.integer "p_remise_id" t.boolean "i_ajust", default: false t.boolean "i_ajust_result", default: false t.date "received_at" t.date "past_paid_at" t.date "past_theo_date" t.boolean "past_diff" t.integer "p_bank_account_id" t.index ["p_bank_account_id"], name: "index_p_payments_on_p_bank_account_id" t.index ["p_payment_type_id"], name: "index_p_payments_on_p_payment_type_id" t.index ["p_remise_id"], name: "index_p_payments_on_p_remise_id" end create_table "p_product_brut_products", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_brut_product_id" t.integer "p_product_id" t.decimal "qte", precision: 12, scale: 4 t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_product_brut_stocks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_brut_product_id" t.integer "p_fournisseur_order_id" t.integer "p_tank_id" t.decimal "qte", precision: 12, scale: 4 t.decimal "price", precision: 13, scale: 5 t.datetime "created_at", null: false t.datetime "updated_at", null: false t.datetime "ok_at" t.decimal "ok_qte", precision: 12, scale: 4 t.decimal "ok_price", precision: 13, scale: 5 t.decimal "ok_price_abs", precision: 13, scale: 5 t.decimal "price_abs", precision: 13, scale: 5 t.boolean "ok", default: false t.decimal "qte_restant", precision: 12, scale: 4, default: "0.0" t.boolean "lock", default: false t.string "stock_type" t.boolean "externe", default: false t.boolean "comptabilised", default: false end create_table "p_product_cats", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "code" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_product_p_normes", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_product_id" t.integer "p_product_spec_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["p_product_id"], name: "index_p_product_p_normes_on_p_product_id" t.index ["p_product_spec_id"], name: "index_p_product_p_normes_on_p_product_spec_id" end create_table "p_product_specs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_product_id" t.string "code" t.text "description" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.boolean "un", default: false t.index ["p_product_id"], name: "index_p_product_specs_on_p_product_id" end create_table "p_products", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.decimal "price", precision: 13, scale: 5 t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "p_product_cat_id" t.string "code" t.string "conditionnement" t.string "uv" t.string "compte_achat" t.string "compte_vente" t.boolean "tgap", default: false t.boolean "fisc", default: false t.string "un" t.decimal "capacite", precision: 10 t.string "compte_transport" t.boolean "enabled", default: true t.index ["p_product_cat_id"], name: "index_p_products_on_p_product_cat_id" end create_table "p_remises", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.date "date" t.boolean "validated", default: false t.integer "p_payment_type_id" t.integer "p_bank_account_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["p_bank_account_id"], name: "index_p_remises_on_p_bank_account_id" t.index ["p_payment_type_id"], name: "index_p_remises_on_p_payment_type_id" end create_table "p_sheet_line_stocks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_sheet_line_id" t.integer "p_brut_product_id" t.integer "p_product_brut_stock_id" t.boolean "ok", default: false t.datetime "ok_at" t.decimal "qte", precision: 14, scale: 4 t.decimal "qte_ok", precision: 14, scale: 4 t.decimal "price", precision: 13, scale: 5 t.decimal "price_ok", precision: 13, scale: 5 t.boolean "lock", default: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.boolean "decr", default: false end create_table "p_sheet_lines", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_customer_sheet_id" t.integer "p_product_id" t.integer "p_tank_id" t.decimal "qte", precision: 12, scale: 4 t.decimal "price", precision: 13, scale: 5 t.datetime "ok_at" t.decimal "ok_qte", precision: 12, scale: 4 t.decimal "ok_price", precision: 13, scale: 5 t.decimal "ok_price_abs", precision: 12, scale: 4 t.boolean "ok" t.boolean "lock" t.boolean "externe", default: false t.integer "externe_stock_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "p_document_id" t.boolean "shiped", default: false t.boolean "bl", default: false t.boolean "ship", default: false t.integer "p_ship_tour_truck_sheet_line_id" t.boolean "stock_done", default: false t.decimal "a_total_cost_ok", precision: 14, scale: 4 t.string "ref" t.decimal "price_tot", precision: 12, scale: 2 t.decimal "price_tot_ttc", precision: 12, scale: 2 t.decimal "ok_price_tot", precision: 12, scale: 2 t.decimal "ok_price_tot_ttc", precision: 12, scale: 2 t.boolean "imported", default: false t.string "piece" t.boolean "arrondi", default: false t.boolean "decr", default: false t.string "custom_title" t.text "custom_desc" t.boolean "no_stock", default: false t.boolean "custom", default: false t.string "element_label" t.index ["p_customer_sheet_id"], name: "index_p_sheet_lines_on_p_customer_sheet_id" t.index ["p_product_id"], name: "index_p_sheet_lines_on_p_product_id" t.index ["p_tank_id"], name: "index_p_sheet_lines_on_p_tank_id" end create_table "p_ship_bill_lines", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_ship_bill_id" t.string "name" t.text "description" t.decimal "qte", precision: 14, scale: 4 t.decimal "price", precision: 14, scale: 4 t.decimal "a_ok_total", precision: 14, scale: 4 t.boolean "paid", default: false t.date "paid_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["p_ship_bill_id"], name: "index_p_ship_bill_lines_on_p_ship_bill_id" end create_table "p_ship_bills", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.date "count_date" t.date "bill_at" t.string "ref" t.integer "p_fournisseur_id" t.text "comment" t.decimal "a_ok_total", precision: 14, scale: 4 t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_ship_spaces", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_ship_tour_truck_id" t.integer "p_product_id" t.integer "p_truck_space_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["p_product_id"], name: "index_p_ship_spaces_on_p_product_id" t.index ["p_ship_tour_truck_id"], name: "index_p_ship_spaces_on_p_ship_tour_truck_id" t.index ["p_truck_space_id"], name: "index_p_ship_spaces_on_p_truck_space_id" end create_table "p_ship_tour_truck_sheet_lines", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "position" t.integer "p_ship_tour_truck_id" t.integer "p_sheet_line_id" t.decimal "qte_shiped", precision: 14, scale: 2 t.boolean "canceled" t.text "raison" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "ref" t.decimal "price_shiped", precision: 13, scale: 5 t.index ["p_sheet_line_id"], name: "index_p_ship_tour_truck_sheet_lines_on_p_sheet_line_id" t.index ["p_ship_tour_truck_id"], name: "index_p_ship_tour_truck_sheet_lines_on_p_ship_tour_truck_id" end create_table "p_ship_tour_trucks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_ship_tour_id" t.integer "p_truck_id" t.integer "p_driver_id" t.text "comment" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "tracteur_id" t.integer "p_ship_tour_truck_id" t.boolean "remorque", default: false t.index ["p_driver_id"], name: "index_p_ship_tour_trucks_on_p_driver_id" t.index ["p_ship_tour_id"], name: "index_p_ship_tour_trucks_on_p_ship_tour_id" t.index ["p_truck_id"], name: "index_p_ship_tour_trucks_on_p_truck_id" end create_table "p_ship_tours", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.datetime "start_at" t.string "state" t.string "code" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.decimal "volu_start", precision: 10 t.decimal "volu_stop", precision: 10 end create_table "p_tank_stocks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.datetime "ok_at" t.boolean "enabled" t.integer "p_brut_product_id" t.decimal "volume", precision: 12, scale: 4 t.decimal "price", precision: 13, scale: 5 t.integer "p_tank_id" t.string "stock_type" t.decimal "volume_abs", precision: 12, scale: 4 t.decimal "volume_restant", precision: 12, scale: 4 t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["p_brut_product_id"], name: "index_p_tank_stocks_on_p_brut_product_id" t.index ["p_tank_id"], name: "index_p_tank_stocks_on_p_tank_id" end create_table "p_tanks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "volume" t.integer "p_brut_product_id" t.index ["p_brut_product_id"], name: "index_p_tanks_on_p_brut_product_id" end create_table "p_truck_spaces", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.decimal "volume", precision: 10 t.integer "p_truck_id" t.integer "default_p_tank_id" t.string "code" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["p_truck_id"], name: "index_p_truck_spaces_on_p_truck_id" end create_table "p_trucks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "marque" t.string "immat" t.string "label" t.integer "image_file_id" t.string "code" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.boolean "remorque", default: false t.integer "p_driver_id" t.integer "remorque_truck_id" end create_table "p_vol_excepts", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "p_volucompteur_id" t.integer "p_brut_product_id" t.decimal "qte", precision: 14, scale: 4 t.boolean "stock", default: false t.text "justif" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "p_volucompteurs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.decimal "start_vol", precision: 14, scale: 4 t.decimal "end_vol", precision: 14, scale: 4 t.text "delta_cause" t.boolean "exact" t.integer "p_ship_tour_truck_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "p_truck_id" t.index ["p_ship_tour_truck_id"], name: "index_p_volucompteurs_on_p_ship_tour_truck_id" end create_table "pages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.text "title" t.text "description" t.text "keywords" t.integer "lang_site_id" t.datetime "created_at" t.datetime "updated_at" t.integer "page_type_id", default: 1 t.boolean "clikable", default: true t.index ["lang_site_id"], name: "index_pages_on_lang_site_id" end create_table "particulars", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.boolean "pro" t.string "organisation" t.string "name" t.string "firstname" t.string "address_1" t.string "address_2" t.string "address_3" t.string "address_4" t.string "address_5" t.string "cp" t.string "city" t.string "country" t.string "tel" t.string "email" t.string "tel2" t.string "tel3" t.string "fax" t.string "owner_type" t.integer "owner_id" t.string "particular_type" t.boolean "skip_validation" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "civilite" t.boolean "archived" t.integer "particular_ref_id" t.boolean "price_in_bl", default: true end create_table "popup_popupables", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "popup_id" t.integer "popupable_id" t.string "popupable_type" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "popups", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.boolean "enabled" t.datetime "start_at" t.datetime "end_at" t.integer "nbr_days" t.integer "nbr_view" t.integer "nbr_occurrences" t.string "title" t.boolean "logo" t.text "description" t.integer "lang_site_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "version_id" end create_table "portlets", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "block_id" t.integer "content_id" t.string "content_type" t.integer "position" t.datetime "created_at" t.datetime "updated_at" end create_table "quote_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.text "quote" t.string "author" t.string "color" t.string "background" t.string "style" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "image_file_id" end create_table "share_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "url" t.string "facebook_url" t.boolean "facebook" t.string "twitter_url" t.string "twitter_title" t.boolean "twitter" t.string "mail_subject" t.string "mail_url" t.text "mail_content" t.boolean "mail" t.string "print_url" t.boolean "print" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "slide_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "home_slider_id" t.string "style" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "specific_map_items", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "specific_map_id" t.decimal "g_latitude", precision: 10, scale: 6 t.decimal "decimal", precision: 10, scale: 6 t.decimal "g_longitude", precision: 10, scale: 6 t.string "g_text" t.string "titre" t.string "name" t.string "firstname" t.string "organisation" t.string "address" t.string "cp" t.string "city" t.string "country" t.string "tel" t.string "email" t.string "website" t.string "notes" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["specific_map_id"], name: "index_specific_map_items_on_specific_map_id" end create_table "specific_maps", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "slug" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "specific_preferences", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "key" t.string "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "table_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "style" t.integer "nbr_rows" t.integer "nbr_cols" t.datetime "created_at" t.datetime "updated_at" end create_table "table_rows", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "position" t.integer "style" t.integer "table_content_id" t.datetime "created_at" t.datetime "updated_at" end create_table "tag_taggables", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "taggable_type" t.integer "taggable_id" t.integer "tag_id" t.datetime "created_at" t.datetime "updated_at" end create_table "tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.string "slug" t.integer "parent_id" t.boolean "public" t.string "taggable_type" t.integer "taggable_id" t.datetime "created_at" t.datetime "updated_at" end create_table "text_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "style" t.text "content" t.datetime "created_at" t.datetime "updated_at" end create_table "time_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "date" t.integer "image_file_id" t.text "description" t.string "style" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "timeline_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "image_file_id" t.string "title" t.integer "position" t.text "content" t.integer "timeline_year_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["image_file_id"], name: "index_timeline_contents_on_image_file_id" t.index ["timeline_year_id"], name: "index_timeline_contents_on_timeline_year_id" end create_table "timeline_histories", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "title" t.string "slug" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "timeline_history_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "timeline_history_id" t.string "style" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["timeline_history_id"], name: "index_timeline_history_contents_on_timeline_history_id" end create_table "timeline_years", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "year" t.integer "r" t.integer "timeline_history_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["timeline_history_id"], name: "index_timeline_years_on_timeline_history_id" end create_table "tiny_urls", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "url" t.string "slug" t.text "description" t.datetime "start_at" t.datetime "stop_at" t.integer "nbr_views" t.datetime "created_at" t.datetime "updated_at" end create_table "title_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.text "content" t.integer "level" t.string "style" t.datetime "created_at" t.datetime "updated_at" t.string "alignement" end create_table "translations", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "locale" t.string "key" t.text "value" t.text "interpolations" t.boolean "is_proc", default: false t.datetime "created_at" t.datetime "updated_at" end create_table "video_contents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.integer "video_file_id" t.string "title" t.boolean "download" t.boolean "autoplay" t.boolean "fullscreen" t.boolean "controls" t.string "legend" t.string "style" t.datetime "created_at" t.datetime "updated_at" t.index ["video_file_id"], name: "index_video_contents_on_video_file_id" end create_table "video_file_langs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "title" t.text "description" t.string "slug" t.integer "video_file_id" t.integer "lang_site_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["video_file_id"], name: "index_video_file_langs_on_video_file_id" end create_table "video_files", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "title" t.text "description" t.string "token" t.string "poster" t.string "mpg" t.string "ogg" t.string "webm" t.string "youtube_link" t.string "youtube_code" t.integer "video_folder_id" t.datetime "created_at" t.datetime "updated_at" t.string "slug" t.integer "image_file_id" t.string "vimeo_code" t.boolean "public", default: false t.datetime "published_at" t.integer "position" t.boolean "fr", default: true t.boolean "en", default: false t.index ["image_file_id"], name: "index_video_files_on_image_file_id" t.index ["video_folder_id"], name: "index_video_files_on_video_folder_id" end create_table "video_folders", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| t.string "name" t.boolean "super_admin" t.text "description" t.datetime "created_at" t.datetime "updated_at" t.boolean "public" t.integer "position" end add_foreign_key "admin_admin_roles", "admin_roles" add_foreign_key "admin_admin_roles", "admins" add_foreign_key "admin_permission_admin_roles", "admin_permissions" add_foreign_key "admin_permission_admin_roles", "admin_roles" add_foreign_key "articleindexs_contents", "categories" add_foreign_key "articles", "article_authors" add_foreign_key "block_contents", "image_files" add_foreign_key "category_categoryables", "categories" add_foreign_key "data_file_passwords", "data_files" add_foreign_key "data_files", "image_files" add_foreign_key "edit_watchers", "admins" add_foreign_key "home_slide_langs", "home_slider_slides" add_foreign_key "home_slide_langs", "lang_sites" add_foreign_key "home_slider_slides", "home_sliders" add_foreign_key "lang_pages", "lang_sites" add_foreign_key "lang_pages", "pages" add_foreign_key "mail_contents", "lang_sites" add_foreign_key "mail_contents", "mail_templates" add_foreign_key "mail_contents", "mail_types" add_foreign_key "menu_item_langs", "image_files" add_foreign_key "menu_item_langs", "lang_sites" add_foreign_key "p_bank_accounts", "data_files" add_foreign_key "p_bank_accounts", "p_customers" add_foreign_key "p_bank_accounts", "p_fournisseurs" add_foreign_key "p_compta_elements", "p_customers" add_foreign_key "p_customer_sheets", "p_customer_sites" add_foreign_key "p_customer_sheets", "p_customers" add_foreign_key "p_customer_sites", "p_customers" add_foreign_key "p_customer_sites", "particulars" add_foreign_key "p_customers", "p_commercials" add_foreign_key "p_documents", "p_commercials" add_foreign_key "p_documents", "p_document_types" add_foreign_key "p_payments", "p_bank_accounts" add_foreign_key "p_payments", "p_payment_types" add_foreign_key "p_payments", "p_remises" add_foreign_key "p_product_p_normes", "p_product_specs" add_foreign_key "p_product_p_normes", "p_products" add_foreign_key "p_product_specs", "p_products" add_foreign_key "p_products", "p_product_cats" add_foreign_key "p_remises", "p_bank_accounts" add_foreign_key "p_remises", "p_payment_types" add_foreign_key "p_sheet_lines", "p_customer_sheets" add_foreign_key "p_sheet_lines", "p_products" add_foreign_key "p_sheet_lines", "p_tanks" add_foreign_key "p_ship_bill_lines", "p_ship_bills" add_foreign_key "p_ship_spaces", "p_products" add_foreign_key "p_ship_spaces", "p_ship_tour_trucks" add_foreign_key "p_ship_spaces", "p_truck_spaces" add_foreign_key "p_ship_tour_truck_sheet_lines", "p_sheet_lines" add_foreign_key "p_ship_tour_truck_sheet_lines", "p_ship_tour_trucks" add_foreign_key "p_ship_tour_trucks", "p_drivers" add_foreign_key "p_ship_tour_trucks", "p_ship_tours" add_foreign_key "p_ship_tour_trucks", "p_trucks" add_foreign_key "p_tank_stocks", "p_brut_products" add_foreign_key "p_tank_stocks", "p_tanks" add_foreign_key "p_tanks", "p_brut_products" add_foreign_key "p_truck_spaces", "p_trucks" add_foreign_key "p_volucompteurs", "p_ship_tour_trucks" add_foreign_key "specific_map_items", "specific_maps" add_foreign_key "timeline_contents", "image_files" add_foreign_key "timeline_contents", "timeline_years" add_foreign_key "timeline_years", "timeline_histories" add_foreign_key "video_file_langs", "video_files" add_foreign_key "video_files", "image_files" end