change type of date_previsionnelle

This commit is contained in:
Tanguy PATTE 2015-08-24 16:28:47 +02:00
parent cee8136ecf
commit bab43c5cd3
3 changed files with 9 additions and 3 deletions

View file

@ -0,0 +1,6 @@
class ChangeDatePrevisionnelDataType < ActiveRecord::Migration
def change
remove_column :dossiers, :date_previsionnelle
add_column :dossiers, :date_previsionnelle, :date
end
end

View file

@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150818113123) do ActiveRecord::Schema.define(version: 20150824134012) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -42,11 +42,11 @@ ActiveRecord::Schema.define(version: 20150818113123) do
t.string "nom_projet" t.string "nom_projet"
t.string "montant_projet" t.string "montant_projet"
t.string "montant_aide_demande" t.string "montant_aide_demande"
t.string "date_previsionnelle"
t.string "lien_plus_infos" t.string "lien_plus_infos"
t.string "mail_contact" t.string "mail_contact"
t.boolean "dossier_termine" t.boolean "dossier_termine"
t.integer "formulaire_id" t.integer "formulaire_id"
t.date "date_previsionnelle"
end end
add_index "dossiers", ["formulaire_id"], name: "index_dossiers_on_formulaire_id", using: :btree add_index "dossiers", ["formulaire_id"], name: "index_dossiers_on_formulaire_id", using: :btree

View file

@ -10,7 +10,7 @@ describe Dossier do
it { is_expected.to have_db_column(:nom_projet) } it { is_expected.to have_db_column(:nom_projet) }
it { is_expected.to have_db_column(:montant_projet) } it { is_expected.to have_db_column(:montant_projet) }
it { is_expected.to have_db_column(:montant_aide_demande) } it { is_expected.to have_db_column(:montant_aide_demande) }
it { is_expected.to have_db_column(:date_previsionnelle) } it { is_expected.to have_db_column(:date_previsionnelle).of_type(:date) }
it { is_expected.to have_db_column(:lien_plus_infos) } it { is_expected.to have_db_column(:lien_plus_infos) }
it { is_expected.to have_db_column(:mail_contact) } it { is_expected.to have_db_column(:mail_contact) }
it { is_expected.to have_db_column(:dossier_termine) } it { is_expected.to have_db_column(:dossier_termine) }