Add migration for type_de_champ header_section in database who have mandatory true
This commit is contained in:
parent
1ccf84dac2
commit
551df27192
2 changed files with 12 additions and 1 deletions
|
@ -0,0 +1,11 @@
|
||||||
|
class FixTypeDeChampHeaderSectionWithMandatoryTrue < ActiveRecord::Migration
|
||||||
|
class TypeDeChamp < ActiveRecord::Base
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def change
|
||||||
|
TypeDeChamp.all.each do |type_de_champ|
|
||||||
|
type_de_champ.update_column(:mandatory, false) if type_de_champ.type_champ == 'header_section'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -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: 20160927154248) do
|
ActiveRecord::Schema.define(version: 20161004175442) 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"
|
||||||
|
|
Loading…
Reference in a new issue