Fix with migration bad table value for nil table attr

This commit is contained in:
Xavier J 2016-09-27 17:53:46 +02:00
parent b3d454a53b
commit 5ff37a270e
6 changed files with 16 additions and 7 deletions

View file

@ -0,0 +1,9 @@
class ChangeEmptytoNilInPreferenceListDossierTable < ActiveRecord::Migration
class PreferenceListDossier < ActiveRecord::Base
end
def change
PreferenceListDossier.where(table: '').update_all table: nil
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160926160051) do
ActiveRecord::Schema.define(version: 20160927154248) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"