commit
3cad63b7b2
1 changed files with 303 additions and 309 deletions
176
db/schema.rb
176
db/schema.rb
|
@ -10,13 +10,13 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20180206153121) do
|
||||
ActiveRecord::Schema.define(version: 2018_02_06_153121) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
enable_extension "unaccent"
|
||||
|
||||
create_table "administrateurs", force: :cascade do |t|
|
||||
create_table "administrateurs", id: :serial, force: :cascade do |t|
|
||||
t.string "email", default: "", null: false
|
||||
t.string "encrypted_password", default: "", null: false
|
||||
t.string "reset_password_token"
|
||||
|
@ -31,19 +31,19 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.datetime "updated_at"
|
||||
t.string "api_token"
|
||||
t.boolean "active", default: false
|
||||
t.index ["email"], name: "index_administrateurs_on_email", unique: true, using: :btree
|
||||
t.index ["reset_password_token"], name: "index_administrateurs_on_reset_password_token", unique: true, using: :btree
|
||||
t.index ["email"], name: "index_administrateurs_on_email", unique: true
|
||||
t.index ["reset_password_token"], name: "index_administrateurs_on_reset_password_token", unique: true
|
||||
end
|
||||
|
||||
create_table "administrateurs_gestionnaires", id: false, force: :cascade do |t|
|
||||
t.integer "administrateur_id"
|
||||
t.integer "gestionnaire_id"
|
||||
t.index ["administrateur_id"], name: "index_administrateurs_gestionnaires_on_administrateur_id", using: :btree
|
||||
t.index ["gestionnaire_id", "administrateur_id"], name: "unique_couple_administrateur_gestionnaire", unique: true, using: :btree
|
||||
t.index ["gestionnaire_id"], name: "index_administrateurs_gestionnaires_on_gestionnaire_id", using: :btree
|
||||
t.index ["administrateur_id"], name: "index_administrateurs_gestionnaires_on_administrateur_id"
|
||||
t.index ["gestionnaire_id", "administrateur_id"], name: "unique_couple_administrateur_gestionnaire", unique: true
|
||||
t.index ["gestionnaire_id"], name: "index_administrateurs_gestionnaires_on_gestionnaire_id"
|
||||
end
|
||||
|
||||
create_table "administrations", force: :cascade do |t|
|
||||
create_table "administrations", id: :serial, force: :cascade do |t|
|
||||
t.string "email", default: "", null: false
|
||||
t.string "encrypted_password", default: "", null: false
|
||||
t.string "reset_password_token"
|
||||
|
@ -56,24 +56,18 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.string "last_sign_in_ip"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.index ["email"], name: "index_administrations_on_email", unique: true, using: :btree
|
||||
t.index ["reset_password_token"], name: "index_administrations_on_reset_password_token", unique: true, using: :btree
|
||||
t.index ["email"], name: "index_administrations_on_email", unique: true
|
||||
t.index ["reset_password_token"], name: "index_administrations_on_reset_password_token", unique: true
|
||||
end
|
||||
|
||||
create_table "ar_internal_metadata", primary_key: "key", id: :string, force: :cascade do |t|
|
||||
t.string "value"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "assign_tos", force: :cascade do |t|
|
||||
create_table "assign_tos", id: :serial, force: :cascade do |t|
|
||||
t.integer "gestionnaire_id"
|
||||
t.integer "procedure_id"
|
||||
t.index ["gestionnaire_id"], name: "index_assign_tos_on_gestionnaire_id", using: :btree
|
||||
t.index ["procedure_id"], name: "index_assign_tos_on_procedure_id", using: :btree
|
||||
t.index ["gestionnaire_id"], name: "index_assign_tos_on_gestionnaire_id"
|
||||
t.index ["procedure_id"], name: "index_assign_tos_on_procedure_id"
|
||||
end
|
||||
|
||||
create_table "attestation_templates", force: :cascade do |t|
|
||||
create_table "attestation_templates", id: :serial, force: :cascade do |t|
|
||||
t.text "title"
|
||||
t.text "body"
|
||||
t.text "footer"
|
||||
|
@ -85,20 +79,20 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.integer "procedure_id"
|
||||
t.string "logo_secure_token"
|
||||
t.string "signature_secure_token"
|
||||
t.index ["procedure_id"], name: "index_attestation_templates_on_procedure_id", unique: true, using: :btree
|
||||
t.index ["procedure_id"], name: "index_attestation_templates_on_procedure_id", unique: true
|
||||
end
|
||||
|
||||
create_table "attestations", force: :cascade do |t|
|
||||
create_table "attestations", id: :serial, force: :cascade do |t|
|
||||
t.string "pdf"
|
||||
t.string "title"
|
||||
t.integer "dossier_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "content_secure_token"
|
||||
t.index ["dossier_id"], name: "index_attestations_on_dossier_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_attestations_on_dossier_id"
|
||||
end
|
||||
|
||||
create_table "avis", force: :cascade do |t|
|
||||
create_table "avis", id: :serial, force: :cascade do |t|
|
||||
t.string "email"
|
||||
t.text "introduction"
|
||||
t.text "answer"
|
||||
|
@ -108,12 +102,12 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.datetime "updated_at", null: false
|
||||
t.integer "claimant_id", null: false
|
||||
t.boolean "confidentiel", default: false, null: false
|
||||
t.index ["claimant_id"], name: "index_avis_on_claimant_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_avis_on_dossier_id", using: :btree
|
||||
t.index ["gestionnaire_id"], name: "index_avis_on_gestionnaire_id", using: :btree
|
||||
t.index ["claimant_id"], name: "index_avis_on_claimant_id"
|
||||
t.index ["dossier_id"], name: "index_avis_on_dossier_id"
|
||||
t.index ["gestionnaire_id"], name: "index_avis_on_gestionnaire_id"
|
||||
end
|
||||
|
||||
create_table "cadastres", force: :cascade do |t|
|
||||
create_table "cadastres", id: :serial, force: :cascade do |t|
|
||||
t.string "surface_intersection"
|
||||
t.float "surface_parcelle"
|
||||
t.string "numero"
|
||||
|
@ -127,37 +121,37 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.integer "dossier_id"
|
||||
end
|
||||
|
||||
create_table "cerfas", force: :cascade do |t|
|
||||
create_table "cerfas", id: :serial, force: :cascade do |t|
|
||||
t.string "content"
|
||||
t.integer "dossier_id"
|
||||
t.datetime "created_at"
|
||||
t.integer "user_id"
|
||||
t.string "original_filename"
|
||||
t.string "content_secure_token"
|
||||
t.index ["dossier_id"], name: "index_cerfas_on_dossier_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_cerfas_on_dossier_id"
|
||||
end
|
||||
|
||||
create_table "champs", force: :cascade do |t|
|
||||
create_table "champs", id: :serial, force: :cascade do |t|
|
||||
t.string "value"
|
||||
t.integer "type_de_champ_id"
|
||||
t.integer "dossier_id"
|
||||
t.string "type"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.index ["dossier_id"], name: "index_champs_on_dossier_id", using: :btree
|
||||
t.index ["type_de_champ_id"], name: "index_champs_on_type_de_champ_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_champs_on_dossier_id"
|
||||
t.index ["type_de_champ_id"], name: "index_champs_on_type_de_champ_id"
|
||||
end
|
||||
|
||||
create_table "closed_mails", force: :cascade do |t|
|
||||
create_table "closed_mails", id: :serial, force: :cascade do |t|
|
||||
t.text "body"
|
||||
t.string "subject"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["procedure_id"], name: "index_closed_mails_on_procedure_id", using: :btree
|
||||
t.index ["procedure_id"], name: "index_closed_mails_on_procedure_id"
|
||||
end
|
||||
|
||||
create_table "commentaires", force: :cascade do |t|
|
||||
create_table "commentaires", id: :serial, force: :cascade do |t|
|
||||
t.string "email"
|
||||
t.datetime "created_at", null: false
|
||||
t.string "body"
|
||||
|
@ -166,11 +160,11 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.integer "piece_justificative_id"
|
||||
t.integer "champ_id"
|
||||
t.string "file"
|
||||
t.index ["champ_id"], name: "index_commentaires_on_champ_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_commentaires_on_dossier_id", using: :btree
|
||||
t.index ["champ_id"], name: "index_commentaires_on_champ_id"
|
||||
t.index ["dossier_id"], name: "index_commentaires_on_dossier_id"
|
||||
end
|
||||
|
||||
create_table "delayed_jobs", force: :cascade do |t|
|
||||
create_table "delayed_jobs", id: :serial, force: :cascade do |t|
|
||||
t.integer "priority", default: 0, null: false
|
||||
t.integer "attempts", default: 0, null: false
|
||||
t.text "handler", null: false
|
||||
|
@ -183,10 +177,10 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "cron"
|
||||
t.index ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree
|
||||
t.index ["priority", "run_at"], name: "delayed_jobs_priority"
|
||||
end
|
||||
|
||||
create_table "dossiers", force: :cascade do |t|
|
||||
create_table "dossiers", id: :serial, force: :cascade do |t|
|
||||
t.boolean "autorisation_donnees"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at"
|
||||
|
@ -201,18 +195,18 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.datetime "processed_at"
|
||||
t.text "motivation"
|
||||
t.datetime "hidden_at"
|
||||
t.index ["hidden_at"], name: "index_dossiers_on_hidden_at", using: :btree
|
||||
t.index ["procedure_id"], name: "index_dossiers_on_procedure_id", using: :btree
|
||||
t.index ["user_id"], name: "index_dossiers_on_user_id", using: :btree
|
||||
t.index ["hidden_at"], name: "index_dossiers_on_hidden_at"
|
||||
t.index ["procedure_id"], name: "index_dossiers_on_procedure_id"
|
||||
t.index ["user_id"], name: "index_dossiers_on_user_id"
|
||||
end
|
||||
|
||||
create_table "drop_down_lists", force: :cascade do |t|
|
||||
create_table "drop_down_lists", id: :serial, force: :cascade do |t|
|
||||
t.string "value"
|
||||
t.integer "type_de_champ_id"
|
||||
t.index ["type_de_champ_id"], name: "index_drop_down_lists_on_type_de_champ_id", using: :btree
|
||||
t.index ["type_de_champ_id"], name: "index_drop_down_lists_on_type_de_champ_id"
|
||||
end
|
||||
|
||||
create_table "entreprises", force: :cascade do |t|
|
||||
create_table "entreprises", id: :serial, force: :cascade do |t|
|
||||
t.string "siren"
|
||||
t.integer "capital_social"
|
||||
t.string "numero_tva_intracommunautaire"
|
||||
|
@ -228,10 +222,10 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.integer "dossier_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.index ["dossier_id"], name: "index_entreprises_on_dossier_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_entreprises_on_dossier_id"
|
||||
end
|
||||
|
||||
create_table "etablissements", force: :cascade do |t|
|
||||
create_table "etablissements", id: :serial, force: :cascade do |t|
|
||||
t.string "siret"
|
||||
t.boolean "siege_social"
|
||||
t.string "naf"
|
||||
|
@ -246,29 +240,29 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.string "code_insee_localite"
|
||||
t.integer "dossier_id"
|
||||
t.integer "entreprise_id"
|
||||
t.index ["dossier_id"], name: "index_etablissements_on_dossier_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_etablissements_on_dossier_id"
|
||||
end
|
||||
|
||||
create_table "exercices", force: :cascade do |t|
|
||||
create_table "exercices", id: :serial, force: :cascade do |t|
|
||||
t.string "ca"
|
||||
t.datetime "dateFinExercice"
|
||||
t.integer "date_fin_exercice_timestamp"
|
||||
t.integer "etablissement_id"
|
||||
end
|
||||
|
||||
create_table "follows", force: :cascade do |t|
|
||||
create_table "follows", id: :serial, force: :cascade do |t|
|
||||
t.integer "gestionnaire_id", null: false
|
||||
t.integer "dossier_id", null: false
|
||||
t.datetime "demande_seen_at"
|
||||
t.datetime "annotations_privees_seen_at"
|
||||
t.datetime "avis_seen_at"
|
||||
t.datetime "messagerie_seen_at"
|
||||
t.index ["dossier_id"], name: "index_follows_on_dossier_id", using: :btree
|
||||
t.index ["gestionnaire_id", "dossier_id"], name: "index_follows_on_gestionnaire_id_and_dossier_id", unique: true, using: :btree
|
||||
t.index ["gestionnaire_id"], name: "index_follows_on_gestionnaire_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_follows_on_dossier_id"
|
||||
t.index ["gestionnaire_id", "dossier_id"], name: "index_follows_on_gestionnaire_id_and_dossier_id", unique: true
|
||||
t.index ["gestionnaire_id"], name: "index_follows_on_gestionnaire_id"
|
||||
end
|
||||
|
||||
create_table "france_connect_informations", force: :cascade do |t|
|
||||
create_table "france_connect_informations", id: :serial, force: :cascade do |t|
|
||||
t.string "gender"
|
||||
t.string "given_name"
|
||||
t.string "family_name"
|
||||
|
@ -277,10 +271,10 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.string "france_connect_particulier_id"
|
||||
t.integer "user_id"
|
||||
t.string "email_france_connect"
|
||||
t.index ["user_id"], name: "index_france_connect_informations_on_user_id", using: :btree
|
||||
t.index ["user_id"], name: "index_france_connect_informations_on_user_id"
|
||||
end
|
||||
|
||||
create_table "gestionnaires", force: :cascade do |t|
|
||||
create_table "gestionnaires", id: :serial, force: :cascade do |t|
|
||||
t.string "email", default: "", null: false
|
||||
t.string "encrypted_password", default: "", null: false
|
||||
t.string "reset_password_token"
|
||||
|
@ -294,29 +288,29 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "procedure_filter"
|
||||
t.index ["email"], name: "index_gestionnaires_on_email", unique: true, using: :btree
|
||||
t.index ["reset_password_token"], name: "index_gestionnaires_on_reset_password_token", unique: true, using: :btree
|
||||
t.index ["email"], name: "index_gestionnaires_on_email", unique: true
|
||||
t.index ["reset_password_token"], name: "index_gestionnaires_on_reset_password_token", unique: true
|
||||
end
|
||||
|
||||
create_table "individuals", force: :cascade do |t|
|
||||
create_table "individuals", id: :serial, force: :cascade do |t|
|
||||
t.string "nom"
|
||||
t.string "prenom"
|
||||
t.string "birthdate"
|
||||
t.integer "dossier_id"
|
||||
t.string "gender"
|
||||
t.index ["dossier_id"], name: "index_individuals_on_dossier_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_individuals_on_dossier_id"
|
||||
end
|
||||
|
||||
create_table "initiated_mails", force: :cascade do |t|
|
||||
create_table "initiated_mails", id: :serial, force: :cascade do |t|
|
||||
t.string "subject"
|
||||
t.text "body"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["procedure_id"], name: "index_initiated_mails_on_procedure_id", using: :btree
|
||||
t.index ["procedure_id"], name: "index_initiated_mails_on_procedure_id"
|
||||
end
|
||||
|
||||
create_table "invites", force: :cascade do |t|
|
||||
create_table "invites", id: :serial, force: :cascade do |t|
|
||||
t.string "email"
|
||||
t.string "email_sender"
|
||||
t.integer "dossier_id"
|
||||
|
@ -324,15 +318,15 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.string "type", default: "InviteGestionnaire"
|
||||
end
|
||||
|
||||
create_table "module_api_cartos", force: :cascade do |t|
|
||||
create_table "module_api_cartos", id: :serial, force: :cascade do |t|
|
||||
t.integer "procedure_id"
|
||||
t.boolean "use_api_carto", default: false
|
||||
t.boolean "quartiers_prioritaires", default: false
|
||||
t.boolean "cadastre", default: false
|
||||
t.index ["procedure_id"], name: "index_module_api_cartos_on_procedure_id", unique: true, using: :btree
|
||||
t.index ["procedure_id"], name: "index_module_api_cartos_on_procedure_id", unique: true
|
||||
end
|
||||
|
||||
create_table "pieces_justificatives", force: :cascade do |t|
|
||||
create_table "pieces_justificatives", id: :serial, force: :cascade do |t|
|
||||
t.string "content"
|
||||
t.integer "dossier_id"
|
||||
t.integer "type_de_piece_justificative_id"
|
||||
|
@ -341,26 +335,26 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.string "original_filename"
|
||||
t.string "content_secure_token"
|
||||
t.datetime "updated_at"
|
||||
t.index ["dossier_id"], name: "index_pieces_justificatives_on_dossier_id", using: :btree
|
||||
t.index ["type_de_piece_justificative_id"], name: "index_pieces_justificatives_on_type_de_piece_justificative_id", using: :btree
|
||||
t.index ["dossier_id"], name: "index_pieces_justificatives_on_dossier_id"
|
||||
t.index ["type_de_piece_justificative_id"], name: "index_pieces_justificatives_on_type_de_piece_justificative_id"
|
||||
end
|
||||
|
||||
create_table "procedure_paths", force: :cascade do |t|
|
||||
create_table "procedure_paths", id: :serial, force: :cascade do |t|
|
||||
t.string "path"
|
||||
t.integer "procedure_id"
|
||||
t.integer "administrateur_id"
|
||||
t.index ["path"], name: "index_procedure_paths_on_path", using: :btree
|
||||
t.index ["path"], name: "index_procedure_paths_on_path"
|
||||
end
|
||||
|
||||
create_table "procedure_presentations", force: :cascade do |t|
|
||||
create_table "procedure_presentations", id: :serial, force: :cascade do |t|
|
||||
t.integer "assign_to_id"
|
||||
t.text "displayed_fields", default: ["{\"label\":\"Demandeur\",\"table\":\"user\",\"column\":\"email\"}"], null: false, array: true
|
||||
t.json "sort", default: "{\"table\":\"notifications\",\"column\":\"notifications\",\"order\":\"desc\"}", null: false
|
||||
t.json "filters", default: "{\"a-suivre\":[],\"suivis\":[],\"traites\":[],\"tous\":[],\"archives\":[]}", null: false
|
||||
t.index ["assign_to_id"], name: "index_procedure_presentations_on_assign_to_id", unique: true, using: :btree
|
||||
t.index ["assign_to_id"], name: "index_procedure_presentations_on_assign_to_id", unique: true
|
||||
end
|
||||
|
||||
create_table "procedures", force: :cascade do |t|
|
||||
create_table "procedures", id: :serial, force: :cascade do |t|
|
||||
t.string "libelle"
|
||||
t.string "description"
|
||||
t.string "organisation", null: false
|
||||
|
@ -383,10 +377,10 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.datetime "archived_at"
|
||||
t.datetime "whitelisted_at"
|
||||
t.boolean "ask_birthday", default: false, null: false
|
||||
t.index ["hidden_at"], name: "index_procedures_on_hidden_at", using: :btree
|
||||
t.index ["hidden_at"], name: "index_procedures_on_hidden_at"
|
||||
end
|
||||
|
||||
create_table "quartier_prioritaires", force: :cascade do |t|
|
||||
create_table "quartier_prioritaires", id: :serial, force: :cascade do |t|
|
||||
t.string "code"
|
||||
t.string "nom"
|
||||
t.string "commune"
|
||||
|
@ -394,25 +388,25 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.integer "dossier_id"
|
||||
end
|
||||
|
||||
create_table "received_mails", force: :cascade do |t|
|
||||
create_table "received_mails", id: :serial, force: :cascade do |t|
|
||||
t.text "body"
|
||||
t.string "subject"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["procedure_id"], name: "index_received_mails_on_procedure_id", using: :btree
|
||||
t.index ["procedure_id"], name: "index_received_mails_on_procedure_id"
|
||||
end
|
||||
|
||||
create_table "refused_mails", force: :cascade do |t|
|
||||
create_table "refused_mails", id: :serial, force: :cascade do |t|
|
||||
t.text "body"
|
||||
t.string "subject"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["procedure_id"], name: "index_refused_mails_on_procedure_id", using: :btree
|
||||
t.index ["procedure_id"], name: "index_refused_mails_on_procedure_id"
|
||||
end
|
||||
|
||||
create_table "rna_informations", force: :cascade do |t|
|
||||
create_table "rna_informations", id: :serial, force: :cascade do |t|
|
||||
t.string "association_id"
|
||||
t.string "titre"
|
||||
t.text "objet"
|
||||
|
@ -420,10 +414,10 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.date "date_declaration"
|
||||
t.date "date_publication"
|
||||
t.integer "entreprise_id"
|
||||
t.index ["entreprise_id"], name: "index_rna_informations_on_entreprise_id", using: :btree
|
||||
t.index ["entreprise_id"], name: "index_rna_informations_on_entreprise_id"
|
||||
end
|
||||
|
||||
create_table "types_de_champ", force: :cascade do |t|
|
||||
create_table "types_de_champ", id: :serial, force: :cascade do |t|
|
||||
t.string "libelle"
|
||||
t.string "type_champ"
|
||||
t.integer "order_place"
|
||||
|
@ -433,7 +427,7 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.string "type"
|
||||
end
|
||||
|
||||
create_table "types_de_piece_justificative", force: :cascade do |t|
|
||||
create_table "types_de_piece_justificative", id: :serial, force: :cascade do |t|
|
||||
t.string "libelle"
|
||||
t.string "description"
|
||||
t.boolean "api_entreprise", default: false
|
||||
|
@ -445,7 +439,7 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.boolean "mandatory", default: false
|
||||
end
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
create_table "users", id: :serial, force: :cascade do |t|
|
||||
t.string "email", default: "", null: false
|
||||
t.string "encrypted_password", default: "", null: false
|
||||
t.string "reset_password_token"
|
||||
|
@ -460,17 +454,17 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
t.datetime "updated_at"
|
||||
t.string "siret"
|
||||
t.string "loged_in_with_france_connect", default: "false"
|
||||
t.index ["email"], name: "index_users_on_email", unique: true, using: :btree
|
||||
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
|
||||
t.index ["email"], name: "index_users_on_email", unique: true
|
||||
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
||||
end
|
||||
|
||||
create_table "without_continuation_mails", force: :cascade do |t|
|
||||
create_table "without_continuation_mails", id: :serial, force: :cascade do |t|
|
||||
t.text "body"
|
||||
t.string "subject"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["procedure_id"], name: "index_without_continuation_mails_on_procedure_id", using: :btree
|
||||
t.index ["procedure_id"], name: "index_without_continuation_mails_on_procedure_id"
|
||||
end
|
||||
|
||||
add_foreign_key "attestation_templates", "procedures"
|
||||
|
@ -488,7 +482,7 @@ ActiveRecord::Schema.define(version: 20180206153121) do
|
|||
add_foreign_key "refused_mails", "procedures"
|
||||
add_foreign_key "without_continuation_mails", "procedures"
|
||||
|
||||
create_view :searches, sql_definition: <<-SQL
|
||||
create_view "searches", sql_definition: <<-SQL
|
||||
SELECT dossiers.id AS dossier_id,
|
||||
(((((((((((((((((((((((((((((((((((((((((((((((((((((((COALESCE(users.email, ''::character varying))::text || ' '::text) || (COALESCE(france_connect_informations.given_name, ''::character varying))::text) || ' '::text) || (COALESCE(france_connect_informations.family_name, ''::character varying))::text) || ' '::text) || (COALESCE(cerfas.content, ''::character varying))::text) || ' '::text) || (COALESCE(champs.value, ''::character varying))::text) || ' '::text) || (COALESCE(drop_down_lists.value, ''::character varying))::text) || ' '::text) || (COALESCE(entreprises.siren, ''::character varying))::text) || ' '::text) || (COALESCE(entreprises.numero_tva_intracommunautaire, ''::character varying))::text) || ' '::text) || (COALESCE(entreprises.forme_juridique, ''::character varying))::text) || ' '::text) || (COALESCE(entreprises.forme_juridique_code, ''::character varying))::text) || ' '::text) || (COALESCE(entreprises.nom_commercial, ''::character varying))::text) || ' '::text) || (COALESCE(entreprises.raison_sociale, ''::character varying))::text) || ' '::text) || (COALESCE(entreprises.siret_siege_social, ''::character varying))::text) || ' '::text) || (COALESCE(entreprises.nom, ''::character varying))::text) || ' '::text) || (COALESCE(entreprises.prenom, ''::character varying))::text) || ' '::text) || (COALESCE(rna_informations.association_id, ''::character varying))::text) || ' '::text) || (COALESCE(rna_informations.titre, ''::character varying))::text) || ' '::text) || COALESCE(rna_informations.objet, ''::text)) || ' '::text) || (COALESCE(etablissements.siret, ''::character varying))::text) || ' '::text) || (COALESCE(etablissements.naf, ''::character varying))::text) || ' '::text) || (COALESCE(etablissements.libelle_naf, ''::character varying))::text) || ' '::text) || (COALESCE(etablissements.adresse, ''::character varying))::text) || ' '::text) || (COALESCE(etablissements.code_postal, ''::character varying))::text) || ' '::text) || (COALESCE(etablissements.localite, ''::character varying))::text) || ' '::text) || (COALESCE(etablissements.code_insee_localite, ''::character varying))::text) || ' '::text) || (COALESCE(individuals.nom, ''::character varying))::text) || ' '::text) || (COALESCE(individuals.prenom, ''::character varying))::text) || ' '::text) || (COALESCE(pieces_justificatives.content, ''::character varying))::text) AS term
|
||||
FROM ((((((((((dossiers
|
||||
|
|
Loading…
Reference in a new issue