2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-07-25 16:25:15 +02:00
|
|
|
class AddEtablissementInfosToServices < ActiveRecord::Migration[6.1]
|
2022-09-05 14:29:45 +02:00
|
|
|
def up
|
|
|
|
add_column :services, :etablissement_infos, :jsonb
|
2022-07-25 16:25:15 +02:00
|
|
|
add_column :services, :etablissement_lat, :decimal, precision: 10, scale: 6
|
|
|
|
add_column :services, :etablissement_lng, :decimal, precision: 10, scale: 6
|
2022-09-05 14:29:45 +02:00
|
|
|
change_column_default :services, :etablissement_infos, {}
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column :services, :etablissement_infos
|
|
|
|
remove_column :services, :etablissement_lat
|
|
|
|
remove_column :services, :etablissement_lng
|
2022-07-25 16:25:15 +02:00
|
|
|
end
|
|
|
|
end
|