migration

This commit is contained in:
Kara Diaby 2022-10-06 13:21:14 +04:00
parent 0eeb4d123e
commit 492c7f377f
3 changed files with 10 additions and 0 deletions

View file

@ -41,6 +41,7 @@
# published_at :datetime
# routing_criteria_name :text default("Votre ville")
# routing_enabled :boolean
# tags :text default([]), is an Array
# test_started_at :datetime
# unpublished_at :datetime
# web_hook_url :string

View file

@ -0,0 +1,7 @@
class AddTagsToProcedures < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
add_column :procedures, :tags, :text, array: true, default: []
add_index :procedures, :tags, using: 'gin', algorithm: :concurrently
end
end

View file

@ -667,6 +667,7 @@ ActiveRecord::Schema.define(version: 2022_10_20_094031) do
t.text "routing_criteria_name", default: "Votre ville"
t.boolean "routing_enabled"
t.bigint "service_id"
t.text "tags", default: [], array: true
t.datetime "test_started_at"
t.datetime "unpublished_at"
t.datetime "updated_at", null: false
@ -683,6 +684,7 @@ ActiveRecord::Schema.define(version: 2022_10_20_094031) do
t.index ["procedure_expires_when_termine_enabled"], name: "index_procedures_on_procedure_expires_when_termine_enabled"
t.index ["published_revision_id"], name: "index_procedures_on_published_revision_id"
t.index ["service_id"], name: "index_procedures_on_service_id"
t.index ["tags"], name: "index_procedures_on_tags", using: :gin
t.index ["zone_id"], name: "index_procedures_on_zone_id"
end