Remove procedure_id from type_de_champ

This commit is contained in:
Paul Chavard 2020-09-02 12:32:44 +02:00
parent d1de1587d3
commit 11a1e44fbe
3 changed files with 19 additions and 17 deletions

View file

@ -2,20 +2,19 @@
# #
# Table name: types_de_champ # Table name: types_de_champ
# #
# id :integer not null, primary key # id :integer not null, primary key
# description :text # description :text
# libelle :string # libelle :string
# mandatory :boolean default(FALSE) # mandatory :boolean default(FALSE)
# options :jsonb # options :jsonb
# order_place :integer # order_place :integer
# private :boolean default(FALSE), not null # private :boolean default(FALSE), not null
# type_champ :string # type_champ :string
# created_at :datetime # created_at :datetime
# updated_at :datetime # updated_at :datetime
# parent_id :bigint # parent_id :bigint
# procedure_id :integer # revision_id :bigint
# revision_id :bigint # stable_id :bigint
# stable_id :bigint
# #
class TypeDeChamp < ApplicationRecord class TypeDeChamp < ApplicationRecord
self.ignored_columns = ['procedure_id'] self.ignored_columns = ['procedure_id']

View file

@ -0,0 +1,5 @@
class RemoveTypeDeChampProcedureId < ActiveRecord::Migration[6.0]
def change
remove_column :types_de_champ, :procedure_id
end
end

View file

@ -10,7 +10,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: 2020_08_19_153016) do ActiveRecord::Schema.define(version: 2020_09_02_103047) 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"
@ -611,7 +611,6 @@ ActiveRecord::Schema.define(version: 2020_08_19_153016) do
t.string "libelle" t.string "libelle"
t.string "type_champ" t.string "type_champ"
t.integer "order_place" t.integer "order_place"
t.integer "procedure_id"
t.text "description" t.text "description"
t.boolean "mandatory", default: false t.boolean "mandatory", default: false
t.boolean "private", default: false, null: false t.boolean "private", default: false, null: false
@ -623,7 +622,6 @@ ActiveRecord::Schema.define(version: 2020_08_19_153016) do
t.bigint "revision_id" t.bigint "revision_id"
t.index ["parent_id"], name: "index_types_de_champ_on_parent_id" t.index ["parent_id"], name: "index_types_de_champ_on_parent_id"
t.index ["private"], name: "index_types_de_champ_on_private" t.index ["private"], name: "index_types_de_champ_on_private"
t.index ["procedure_id"], name: "index_types_de_champ_on_procedure_id"
t.index ["revision_id"], name: "index_types_de_champ_on_revision_id" t.index ["revision_id"], name: "index_types_de_champ_on_revision_id"
t.index ["stable_id"], name: "index_types_de_champ_on_stable_id" t.index ["stable_id"], name: "index_types_de_champ_on_stable_id"
end end