From 9481f12294c9326b4762284ee10de5b6f7e42b55 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 21 Feb 2018 16:26:49 +0100 Subject: [PATCH] Inline entreprise and rna in to etablissement --- ...1104139_add_entreprise_to_etablissement.rb | 26 +++++++++++++++++++ db/schema.rb | 20 ++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 db/migrate/20180221104139_add_entreprise_to_etablissement.rb diff --git a/db/migrate/20180221104139_add_entreprise_to_etablissement.rb b/db/migrate/20180221104139_add_entreprise_to_etablissement.rb new file mode 100644 index 000000000..81889d58c --- /dev/null +++ b/db/migrate/20180221104139_add_entreprise_to_etablissement.rb @@ -0,0 +1,26 @@ +class AddEntrepriseToEtablissement < ActiveRecord::Migration[5.2] + def change + add_column :etablissements, :entreprise_siren, :string + add_column :etablissements, :entreprise_capital_social, :integer + add_column :etablissements, :entreprise_numero_tva_intracommunautaire, :string + add_column :etablissements, :entreprise_forme_juridique, :string + add_column :etablissements, :entreprise_forme_juridique_code, :string + add_column :etablissements, :entreprise_nom_commercial, :string + add_column :etablissements, :entreprise_raison_sociale, :string + add_column :etablissements, :entreprise_siret_siege_social, :string + add_column :etablissements, :entreprise_code_effectif_entreprise, :string + add_column :etablissements, :entreprise_date_creation, :date + add_column :etablissements, :entreprise_nom, :string + add_column :etablissements, :entreprise_prenom, :string + + add_column :etablissements, :association_rna, :string + add_column :etablissements, :association_titre, :string + add_column :etablissements, :association_objet, :text + add_column :etablissements, :association_date_creation, :date + add_column :etablissements, :association_date_declaration, :date + add_column :etablissements, :association_date_publication, :date + + add_column :champs, :etablissement_id, :integer, index: true + add_column :exercices, :date_fin_exercice, :datetime + end +end diff --git a/db/schema.rb b/db/schema.rb index c85827d5a..d7e76bbf8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -161,6 +161,7 @@ ActiveRecord::Schema.define(version: 2018_02_26_162351) do t.datetime "created_at" t.datetime "updated_at" t.boolean "private" + t.integer "etablissement_id" t.index ["dossier_id"], name: "index_champs_on_dossier_id" t.index ["private"], name: "index_champs_on_private" t.index ["type_de_champ_id"], name: "index_champs_on_type_de_champ_id" @@ -264,6 +265,24 @@ ActiveRecord::Schema.define(version: 2018_02_26_162351) do t.string "code_insee_localite" t.integer "dossier_id" t.integer "entreprise_id" + t.string "entreprise_siren" + t.integer "entreprise_capital_social" + t.string "entreprise_numero_tva_intracommunautaire" + t.string "entreprise_forme_juridique" + t.string "entreprise_forme_juridique_code" + t.string "entreprise_nom_commercial" + t.string "entreprise_raison_sociale" + t.string "entreprise_siret_siege_social" + t.string "entreprise_code_effectif_entreprise" + t.date "entreprise_date_creation" + t.string "entreprise_nom" + t.string "entreprise_prenom" + t.string "association_rna" + t.string "association_titre" + t.text "association_objet" + t.date "association_date_creation" + t.date "association_date_declaration" + t.date "association_date_publication" t.index ["dossier_id"], name: "index_etablissements_on_dossier_id" end @@ -272,6 +291,7 @@ ActiveRecord::Schema.define(version: 2018_02_26_162351) do t.datetime "dateFinExercice" t.integer "date_fin_exercice_timestamp" t.integer "etablissement_id" + t.datetime "date_fin_exercice" end create_table "follows", id: :serial, force: :cascade do |t|