diff --git a/db/migrate/20180404113409_change_birthdate_type_from_individual.rb b/db/migrate/20180404113409_change_birthdate_type_from_individual.rb new file mode 100644 index 000000000..0b0e750ec --- /dev/null +++ b/db/migrate/20180404113409_change_birthdate_type_from_individual.rb @@ -0,0 +1,6 @@ +class ChangeBirthdateTypeFromIndividual < ActiveRecord::Migration[5.2] + def up + remove_column :individuals, :birthdate, :string + rename_column :individuals, :second_birthdate, :birthdate + end +end diff --git a/db/schema.rb b/db/schema.rb index 303a660fd..51e42562f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2018_04_03_094135) do +ActiveRecord::Schema.define(version: 2018_04_04_113409) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -361,12 +361,11 @@ ActiveRecord::Schema.define(version: 2018_04_03_094135) do 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.datetime "created_at" t.datetime "updated_at" - t.date "second_birthdate" + t.date "birthdate" t.index ["dossier_id"], name: "index_individuals_on_dossier_id" end