apidae 1.3.2 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3df5740373cfa229b7411e21a55eae04df831561
4
- data.tar.gz: ec010b9d61a4cea4fa552180531f606498e04231
2
+ SHA256:
3
+ metadata.gz: 0f7955611d92ce6a8114bf59cffe2f7a4cd4e9b39c7ce2529bf891d3fc08c2ad
4
+ data.tar.gz: 0abe8291d4f85db730f5942e3fd3504a2f649594ee56232604b9ff4ee59cd43f
5
5
  SHA512:
6
- metadata.gz: 141dca6a42911917ad0722772df54b4f542364de8fe1502586e6710d9a37b0ade5cddd9abf5994b6768d8597b66fe3627f4fa3068d8d8da7506a4f899fa34737
7
- data.tar.gz: 17f51ee8066cd53f353bf91f395191bb78255343f65f7978ff01e56c27b9205d91203687ad0c7b4b234cb05b88116decba24df1eba317b51d52992a9baa9495e
6
+ metadata.gz: 5c5ae0d93814c8d2245736db124dd635c6ba44963bc18592c6edae81e8f1609fe30dcc37408f80c53e1eadcccae04ca684fb73d537e0996e4aa88874b2870d61
7
+ data.tar.gz: 4105a6f1f1de41ff52b873ba735633055995a220653b4a209325fd8e17fb8e56a946c1f06add44af7ed3efe0f5ac9a128b2d9aa0eb3b249628771e88972365e0
@@ -44,7 +44,7 @@ module Apidae
44
44
  'LUNDI' => MONDAY,
45
45
  'MARDI' => TUESDAY,
46
46
  'MERCREDI' => WEDNESDAY,
47
- 'JEUD' => THURSDAY,
47
+ 'JEUDI' => THURSDAY,
48
48
  'VENDREDI' => FRIDAY,
49
49
  'SAMEDI' => SATURDAY,
50
50
  'DIMANCHE' => SUNDAY
@@ -151,6 +151,7 @@ module Apidae
151
151
  name: localized_value(att, :nom, locale),
152
152
  url: att[:traductionFichiers][0][:url].gsub('http:', 'https:'),
153
153
  type: att[:type],
154
+ link: att[:link],
154
155
  description: localized_value(att, :legende, locale)
155
156
  }
156
157
  end
@@ -222,6 +223,8 @@ module Apidae
222
223
  loc_data[:latitude] = geoloc_details[:geoJson][:coordinates][1]
223
224
  loc_data[:longitude] = geoloc_details[:geoJson][:coordinates][0]
224
225
  end
226
+ loc_data[:map_reference] = geoloc_details[:reperePlan]
227
+ loc_data[:altitude] = geoloc_details[:altitude] if geoloc_details
225
228
  loc_data[:access] = node_value(geoloc_details, :complement) if geoloc_details
226
229
  loc_data[:environments] = location_hash[:environnements].map {|e| e[:id]} if location_hash[:environnements]
227
230
  end
@@ -236,6 +239,7 @@ module Apidae
236
239
  openings_desc: node_value(openings_hash, :periodeEnClair, *locales),
237
240
  openings_desc_mode: openings_hash[:periodeEnClairGenerationMode] == 'AUTOMATIQUE' ? MODE_AUTO : MODE_MANUAL,
238
241
  openings: build_openings(openings_hash, *locales),
242
+ all_year_long: openings_hash[:ouvertTouteLAnnee] == 'OUVERT_TOUTE_L_ANNEE' ? 'true' : 'false',
239
243
  time_periods: lists_ids(openings_hash[:indicationsPeriode]),
240
244
  openings_extra: lists_ids(openings_hash[:ouverturesComplementaires])
241
245
  }
@@ -264,7 +268,7 @@ module Apidae
264
268
  apidae_obj.apidae_subtype = node_id(data_hash, :rubrique) if apidae_obj.apidae_type == Obj::EQU
265
269
  apidae_obj.apidae_subtype = lists_ids(data_hash[:typesHebergement]).first if apidae_obj.apidae_type == Obj::SPA
266
270
  {
267
- categories: lists_ids(data_hash[:categories], data_hash[:typesDetailles], data_hash[:activiteCategories]),
271
+ categories: lists_ids(data_hash[:categories], data_hash[:typesDetailles], data_hash[:activiteCategories], data_hash[:typesHabitation]),
268
272
  themes: lists_ids(data_hash[:themes]),
269
273
  capacity: (data_hash[:capacite] || {})
270
274
  .merge(presta_hash ? {group_min: presta_hash[:tailleGroupeMin], group_max: presta_hash[:tailleGroupeMax],
@@ -275,7 +279,8 @@ module Apidae
275
279
  (node_id(data_hash, :typeLabel) ? [node_id(data_hash, :typeLabel)] : []),
276
280
  chains: lists_ids(data_hash[:chaines]) + nodes_ids(data_hash[:chaineEtLabel]),
277
281
  area: apidae_obj.apidae_type == Obj::DOS ? data_hash.except(:classification) : node_value(data_hash, :lieuDePratique),
278
- track: apidae_obj.apidae_type == Obj::EQU ? data_hash[:itineraire] : nil,
282
+ track: apidae_obj.apidae_type == Obj::EQU ? (data_hash[:itineraire] || {}).except(:passagesDelicats) : nil,
283
+ tricky_sections: apidae_obj.apidae_type == Obj::EQU ? node_value(data_hash[:itineraire], :passagesDelicats, *locales) : nil,
279
284
  products: lists_ids(data_hash[:typesProduit], data_hash[:aopAocIgps], data_hash[:specialites]),
280
285
  audience: lists_ids(prestations_hash[:typesClientele]),
281
286
  animals: {allowed: prestations_hash[:animauxAcceptes] == 'ACCEPTES', desc: node_value(prestations_hash, :descriptifAnimauxAcceptes, *locales),
@@ -317,13 +322,17 @@ module Apidae
317
322
  tags
318
323
  end
319
324
 
320
- def self.parse_booking(reservation_hash, *locales)
325
+ def self.parse_booking(reservation_hash, visits_hash, *locales)
326
+ booking_hash = {}
321
327
  if reservation_hash
322
- {
323
- booking_desc: node_value(reservation_hash, :complement, *locales),
324
- booking_entities: reservation_hash[:organismes]
325
- }
328
+ booking_hash[:booking_desc] = node_value(reservation_hash, :complement, *locales),
329
+ booking_hash[:booking_entities] = reservation_hash[:organismes]
330
+ end
331
+ if visits_hash
332
+ booking_hash[:visits_allowed] = visits_hash[:visitable] == true
333
+ booking_hash[:visits_desc] = node_value(visits_hash, :complementVisite, *locales)
326
334
  end
335
+ booking_hash
327
336
  end
328
337
 
329
338
  def self.parse_town(location_hash)
@@ -337,8 +346,14 @@ module Apidae
337
346
 
338
347
  def self.parse_entity_fields(information_hash, type_data_hash, sp_hash)
339
348
  entity_hash = {}
340
- if information_hash && information_hash[:structureGestion]
341
- entity_hash.merge!({entity_id: information_hash[:structureGestion][:id], service_provider_id: node_id(type_data_hash, :prestataireActivites)})
349
+ if information_hash
350
+ if information_hash[:structureGestion]
351
+ entity_hash.merge!({entity_id: information_hash[:structureGestion][:id], service_provider_id: node_id(type_data_hash, :prestataireActivites)})
352
+ end
353
+
354
+ if information_hash[:informationsLegales]
355
+ entity_hash.merge!({legal: information_hash[:informationsLegales]})
356
+ end
342
357
  end
343
358
  if sp_hash && sp_hash[:prestataireActivites]
344
359
  entity_hash[:is_service_provider] = true
@@ -30,18 +30,21 @@ module Apidae
30
30
  Town.import(zfile.read(TOWNS_FILE))
31
31
  logger.info "Completed #{Town.count} towns update"
32
32
  end
33
- zfile.each do |file|
33
+ ordered_files(zfile).each do |file|
34
34
  if file.file? && file.name.end_with?('.json')
35
35
  logger.info "Processing file : #{file.name}"
36
36
  if file.name.include?(MODIFIED_DIR)
37
37
  add_or_update_objects(zfile.read(file.name), result, project.locales, project.versions)
38
- elsif file.name.include?(DELETED_FILE)
39
- delete_objects(zfile.read(file.name), result)
40
- elsif file.name.include?(SELECTIONS_FILE)
38
+ end
39
+ if file.name.include?(SELECTIONS_FILE)
41
40
  add_or_update_selections(project, zfile.read(file.name), result)
42
41
  end
42
+ if file.name.include?(DELETED_FILE)
43
+ delete_objects(zfile.read(file.name), result)
44
+ end
43
45
  end
44
46
  end
47
+ project.cleanup_selections
45
48
  create(result.except(:selections)
46
49
  .merge({remote_file: (zip_file.is_a?(File) ? zip_file.path : zip_file), status: STATUS_COMPLETE, apidae_id: project_id}))
47
50
  logger.info "Import results : #{result}"
@@ -104,12 +107,16 @@ module Apidae
104
107
  end
105
108
  end
106
109
 
110
+ def self.ordered_files(zfile)
111
+ zfile.sort_by {|f| f.name.include?(MODIFIED_DIR) ? 0 : (f.name.include?(SELECTIONS_FILE) ? 1 : 2)}
112
+ end
113
+
107
114
  def self.delete_objects(deleted_json, result)
108
115
  deleted_ids = JSON.parse(deleted_json)
109
116
  deleted_ids.each do |id|
110
117
  obj = Obj.find_by_apidae_id(id)
111
118
  if obj
112
- obj.destroy!
119
+ obj.destroy! if obj.selections.empty?
113
120
  result[:deleted] += 1
114
121
  else
115
122
  logger.info "skipping object deletion : #{id}"
@@ -163,7 +170,9 @@ module Apidae
163
170
  def self.add_or_update_selections(project, selections_json, result)
164
171
  selections_hashes = JSON.parse(selections_json, symbolize_names: true)
165
172
  deleted_ids = Selection.where(apidae_project_id: project.id).collect {|sel| sel.apidae_id}.uniq - selections_hashes.collect {|sel| sel[:id]}
166
- Selection.where(apidae_id: deleted_ids).delete_all
173
+ apidae_selection_ids = Selection.where(apidae_id: deleted_ids).map {|s| s.id}
174
+ SelectionObject.where(apidae_selection_id: apidae_selection_ids).delete_all
175
+ Selection.where(id: apidae_selection_ids).delete_all
167
176
  selections_hashes.each do |selection_data|
168
177
  logger.info "Updating selection #{selection_data[:id]}"
169
178
  Selection.add_or_update(selection_data, project.id)
@@ -7,6 +7,7 @@ module Apidae
7
7
 
8
8
  attr_accessor :locale
9
9
  attr_accessor :obj_version
10
+ attr_accessor :obj_versions
10
11
 
11
12
  store_accessor :title_data, :title
12
13
  store_accessor :owner_data, :owner_name, :owner_id
@@ -14,15 +15,15 @@ module Apidae
14
15
  store_accessor :pictures_data, :pictures
15
16
  store_accessor :attachments_data, :attachments
16
17
  store_accessor :type_data, :categories, :themes, :capacity, :classification, :labels, :chains, :area, :track,
17
- :products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
18
- store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id, :is_service_provider
18
+ :tricky_sections, :products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
19
+ store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id, :is_service_provider, :legal
19
20
  store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :fax,
20
21
  :mobile_website, :shorty_url, :contacts
21
- store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments
22
+ store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments, :altitude, :map_reference
22
23
  store_accessor :openings_data, :openings_desc, :openings_desc_mode, :openings, :time_periods, :openings_extra
23
24
  store_accessor :rates_data, :rates_desc, :rates_desc_mode, :rates, :payment_methods, :includes, :excludes, :rates_extra
24
25
  store_accessor :service_data, :services, :equipments, :comfort, :activities, :challenged, :languages
25
- store_accessor :booking_data, :booking_desc, :booking_entities
26
+ store_accessor :booking_data, :booking_desc, :booking_entities, :visits_allowed, :visits_desc
26
27
  store_accessor :tags_data, :promo, :internal, :linked
27
28
  store_accessor :version_data, :versioned_fields
28
29
 
@@ -83,7 +84,7 @@ module Apidae
83
84
  COS => {node: :informationsCommerceEtService, subtype: :commerceEtServiceType},
84
85
  DEG => {node: :informationsDegustation, subtype: :degustationType},
85
86
  DOS => {node: :informationsDomaineSkiable, subtype: :domaineSkiableType},
86
- EQU => {node: :informationsEquipement, subtype: :equipementType},
87
+ EQU => {node: :informationsEquipement, subtype: :rubrique},
87
88
  FEM => {node: :informationsFeteEtManifestation, subtype: :feteEtManifestationType},
88
89
  HCO => {node: :informationsHebergementCollectif, subtype: :hebergementCollectifType},
89
90
  HLO => {node: :informationsHebergementLocatif, subtype: :hebergementLocatifType},
@@ -100,6 +101,7 @@ module Apidae
100
101
  after_initialize do
101
102
  @locale = DEFAULT_LOCALE
102
103
  @obj_version = DEFAULT_VERSION
104
+ @obj_versions = {}
103
105
  end
104
106
 
105
107
  def root_obj
@@ -111,11 +113,15 @@ module Apidae
111
113
  end
112
114
 
113
115
  def in_version(v)
114
- @cached_versions ||= {}
115
- if @cached_versions[v].nil?
116
- @cached_versions[v] = versions.where(version: v).first
116
+ if v == DEFAULT_VERSION && root_obj_id.nil?
117
+ @obj_version = DEFAULT_VERSION
118
+ self
119
+ else
120
+ if @obj_versions[v].nil?
121
+ @obj_versions[v] = versions.where(version: v).first
122
+ end
123
+ @obj_versions[v]
117
124
  end
118
- @cached_versions[v]
119
125
  end
120
126
 
121
127
  def in_locale(l)
@@ -164,6 +170,7 @@ module Apidae
164
170
  apidae_obj
165
171
  end
166
172
 
173
+ # Note : overrides existing fields (not a merge)
167
174
  def self.populate_fields(apidae_obj, object_data, locales)
168
175
  type_fields = TYPES_DATA[object_data[:type]]
169
176
  apidae_obj.last_update = DateTime.parse(object_data[:gestion][:dateModification]) unless object_data[:gestion].blank?
@@ -178,7 +185,7 @@ module Apidae
178
185
  apidae_obj.town = ApidaeDataParser.parse_town(object_data[:localisation])
179
186
  apidae_obj.openings_data = ApidaeDataParser.parse_openings(object_data[:ouverture], *locales)
180
187
  apidae_obj.rates_data = ApidaeDataParser.parse_rates(object_data[:descriptionTarif], *locales)
181
- apidae_obj.booking_data = ApidaeDataParser.parse_booking(object_data[:reservation], *locales)
188
+ apidae_obj.booking_data = ApidaeDataParser.parse_booking(object_data[:reservation], object_data[:visites], *locales)
182
189
  apidae_obj.type_data = ApidaeDataParser.parse_type_data(apidae_obj, object_data[type_fields[:node]], object_data[:prestations],
183
190
  object_data[:tourismeAffaires], *locales)
184
191
  apidae_obj.pictures_data = ApidaeDataParser.parse_pictures_data(object_data[:illustrations], *locales)
@@ -20,5 +20,11 @@ module Apidae
20
20
  def versions=(values)
21
21
  self.versions_data = values.blank? ? nil : values.join('|')
22
22
  end
23
+
24
+ def cleanup_selections
25
+ apidae_selections.reload.each do |s|
26
+ s.cleanup
27
+ end
28
+ end
23
29
  end
24
30
  end
@@ -42,6 +42,20 @@ module Apidae
42
42
  SelectionObject.where(apidae_selection_id: apidae_sel.id, apidae_object_id: removed_ids).delete_all
43
43
  end
44
44
 
45
+ def cleanup
46
+ obsolete_count = apidae_selection_objects
47
+ .joins("LEFT JOIN apidae_objs ON apidae_objs.id = apidae_selection_objects.apidae_object_id")
48
+ .where("apidae_objs.id IS NULL")
49
+ .delete_all
50
+ logger.info "Cleaned up #{obsolete_count} obsolete selection-objects associations for selection #{apidae_id}"
51
+
52
+ dups = apidae_selection_objects.reload.group(:apidae_object_id)
53
+ .select("COUNT(id), apidae_object_id, ARRAY_AGG(id) AS so_ids")
54
+ .having("COUNT(id) > ?", 1).map {|so| so.so_ids}
55
+ dups_count = apidae_selection_objects.where(id: dups.map {|d| d.sort[1..-1]}.flatten).delete_all
56
+ logger.info "Cleaned up #{dups_count} duplicate selection-objects associations for selection #{apidae_id}"
57
+ end
58
+
45
59
  def results(where_clause, offset, size)
46
60
  objects.includes(:town).limit(size).offset(offset).where(where_clause)
47
61
  end
@@ -69,7 +83,7 @@ module Apidae
69
83
  key = cache_key(:agenda, from, to)
70
84
  res = $apidae_cache.read(key)
71
85
  unless res
72
- query_args = build_args(AGENDA_ENDPOINT, {selection_ids: [apidae_id], from: from, to: to})
86
+ query_args = build_args(AGENDA_ENDPOINT, {selection_ids: [apidae_id], from: from, to: to, count: 200})
73
87
  res = query_api(query_args, true)
74
88
  $apidae_cache.write(key, res)
75
89
  end
@@ -142,14 +156,15 @@ module Apidae
142
156
 
143
157
  if all_results
144
158
  loops = 0
159
+ max_loops = only_ids ? 50 : MAX_LOOPS
145
160
  query_args[:first] = 0
146
- query_args[:count] = MAX_COUNT
161
+ query_args[:count] ||= MAX_COUNT
147
162
  query_args[:locales] ||= apidae_project && !apidae_project.locales.blank? ? apidae_project.locales : [DEFAULT_LOCALE]
148
163
  response = JSON.parse get_response(query_args), symbolize_names: false
149
164
  total = response['numFound']
150
165
  query_result[:results] = (only_ids ? response['objetTouristiqueIds'] : response['objetsTouristiques']) || {}
151
166
 
152
- while total > results_count(query_result) && loops < MAX_LOOPS
167
+ while total > results_count(query_result) && loops < max_loops
153
168
  loops += 1
154
169
  query_args[:first] += MAX_COUNT
155
170
  response = JSON.parse get_response(query_args), symbolize_names: false
@@ -5,6 +5,7 @@ module Apidae
5
5
  territories_hashes.each do |t_data|
6
6
  t = Territory.find_or_initialize_by(apidae_id: t_data[:id])
7
7
  t.name = t_data.dig(:nom, :libelleFr)
8
+ t.apidae_type = t_data.dig(:territoireType, :id)
8
9
  t.save!
9
10
  end
10
11
  end
@@ -27,6 +27,9 @@ module Apidae
27
27
 
28
28
  LOCALIZED_FIELDS = [:title, :short_desc, :long_desc, :pictures, :attachments, :openings_desc, :rates_desc,
29
29
  :includes, :excludes, :extra, :booking_desc]
30
- ALL_FIELDS = LOCALIZED_FIELDS + [:theme_desc, :private_desc, :capacity, :telephone, :email, :website, :services,
31
- :equipments, :comfort, :activities, :promo, :internal, :linked]
30
+ ALL_FIELDS = LOCALIZED_FIELDS + [:theme_desc, :private_desc, :capacity, :telephone, :email, :website,
31
+ :google, :facebook, :twitter, :yelp, :trip_advisor, :fax, :mobile_website, :shorty_url,
32
+ :openings, :openings_extra, :rates, :services, :payment_methods, :categories, :themes,
33
+ :labels, :chains, :classification, :challenged, :environments, :languages, :products,
34
+ :animals, :equipments, :comfort, :activities, :promo, :internal, :linked]
32
35
  end
@@ -0,0 +1,5 @@
1
+ class AddApidaeTypeToApidaeTerritories < ActiveRecord::Migration[6.1]
2
+ def change
3
+ add_column :apidae_territories, :apidae_type, :integer
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "1.3.2"
2
+ VERSION = "1.3.6"
3
3
  end
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "id": 49063,
4
+ "libelle": {
5
+ "libelleFr": "Sélection 2"
6
+ },
7
+ "nom": "Sélection 2",
8
+ "objetsTouristiques": [
9
+ {
10
+ "type": "STRUCTURE",
11
+ "id": 503
12
+ }
13
+ ]
14
+ }
15
+ ]
@@ -0,0 +1 @@
1
+ //= link_tree ../images
@@ -2,15 +2,15 @@
2
2
  # of editing this file, please use the migrations feature of Active Record to
3
3
  # incrementally modify your database, and then regenerate this schema definition.
4
4
  #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
5
+ # This file is the source Rails uses to define your schema when running `bin/rails
6
+ # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
+ # be faster and is potentially less error prone than running all of your
8
+ # migrations from scratch. Old migrations may fail to apply correctly if those
9
+ # migrations use external dependencies or application code.
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2020_05_22_124205) do
13
+ ActiveRecord::Schema.define(version: 2021_06_07_214647) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -92,8 +92,10 @@ ActiveRecord::Schema.define(version: 2020_05_22_124205) do
92
92
  t.datetime "created_at", null: false
93
93
  t.datetime "updated_at", null: false
94
94
  t.jsonb "meta_data"
95
+ t.boolean "is_active"
95
96
  t.index ["apidae_id"], name: "index_apidae_references_on_apidae_id"
96
97
  t.index ["apidae_type"], name: "index_apidae_references_on_apidae_type"
98
+ t.index ["is_active"], name: "index_apidae_references_on_is_active"
97
99
  end
98
100
 
99
101
  create_table "apidae_selection_objects", force: :cascade do |t|
@@ -112,6 +114,13 @@ ActiveRecord::Schema.define(version: 2020_05_22_124205) do
112
114
  t.integer "apidae_project_id"
113
115
  end
114
116
 
117
+ create_table "apidae_territories", force: :cascade do |t|
118
+ t.integer "apidae_id"
119
+ t.string "name"
120
+ t.integer "apidae_type"
121
+ t.index ["apidae_id"], name: "index_apidae_territories_on_apidae_id"
122
+ end
123
+
115
124
  create_table "apidae_towns", id: :serial, force: :cascade do |t|
116
125
  t.string "country"
117
126
  t.integer "apidae_id"
@@ -65,3 +65,335 @@ Migrating to AddLocalesDataToApidaeProjects (20190123214635)
65
65
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
66
66
  Apidae::Obj Load (26.8ms) SELECT apidae_id, COUNT(id) FROM "apidae_objs" WHERE "apidae_objs"."root_obj_id" IS NULL GROUP BY "apidae_objs"."apidae_id" HAVING (COUNT(id) > 1)
67
67
  Apidae::Obj Load (2.4ms) SELECT apidae_id, COUNT(id) FROM "apidae_objs" WHERE "apidae_objs"."root_obj_id" IS NULL GROUP BY "apidae_objs"."apidae_id" HAVING (COUNT(id) > 1)
68
+ Apidae::Obj Load (0.8ms) SELECT "apidae_objs".* FROM "apidae_objs" ORDER BY "apidae_objs"."id" ASC LIMIT $1 [["LIMIT", 1]]
69
+  (3.4ms) SELECT COUNT(*) FROM "apidae_objs"
70
+  (20.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
71
+  (40.8ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
72
+  (0.9ms) SELECT pg_try_advisory_lock(6140174353533887940)
73
+  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
74
+ Migrating to CreateApidaeSelections (20170512212941)
75
+  (0.1ms) BEGIN
76
+  (40.3ms) CREATE TABLE "apidae_selections" ("id" serial NOT NULL PRIMARY KEY, "label" character varying, "reference" character varying, "apidae_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
77
+ ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170512212941"]]
78
+  (0.4ms) COMMIT
79
+ Migrating to CreateApidaeObjects (20170512214641)
80
+  (40.8ms) BEGIN
81
+  (6.7ms) CREATE TABLE "apidae_objects" ("id" serial NOT NULL PRIMARY KEY, "address" character varying, "apidae_id" integer, "apidae_type" character varying, "apidae_subtype" character varying, "title" character varying, "short_desc" text, "contact" text, "long_desc" text, "type_data" text, "latitude" float, "longitude" float, "openings" text, "rates" text, "reservation" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
82
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170512214641"]]
83
+  (0.4ms) COMMIT
84
+ Migrating to CreateApidaeObjectsApidaeSelections (20170512221525)
85
+  (39.6ms) BEGIN
86
+  (4.7ms) CREATE TABLE "apidae_objects_apidae_selections" ("id" serial NOT NULL PRIMARY KEY, "object_id" integer, "selection_id" integer)
87
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170512221525"]]
88
+  (0.3ms) COMMIT
89
+ Migrating to CreateApidaeTowns (20170513114002)
90
+  (40.7ms) BEGIN
91
+  (6.2ms) CREATE TABLE "apidae_towns" ("id" serial NOT NULL PRIMARY KEY, "country" character varying, "apidae_id" integer, "insee_code" character varying, "name" character varying, "postal_code" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
92
+  (1.0ms) CREATE UNIQUE INDEX "index_apidae_towns_on_insee_code" ON "apidae_towns" ("insee_code")
93
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170513114002"]]
94
+  (0.4ms) COMMIT
95
+ Migrating to AddTownInseeCodeToObjects (20170513114409)
96
+  (40.5ms) BEGIN
97
+  (4.3ms) ALTER TABLE "apidae_objects" ADD "town_insee_code" character varying
98
+ ActiveRecord::SchemaMigration Create (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170513114409"]]
99
+  (0.4ms) COMMIT
100
+ Migrating to AddPicturesDataToObjects (20170513115401)
101
+  (0.2ms) BEGIN
102
+  (0.3ms) ALTER TABLE "apidae_objects" ADD "pictures_data" text
103
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170513115401"]]
104
+  (27.1ms) COMMIT
105
+ Migrating to CreateApidaeAttachedFiles (20170513121215)
106
+  (0.3ms) BEGIN
107
+  (24.8ms) CREATE TABLE "apidae_attached_files" ("id" serial NOT NULL PRIMARY KEY, "name" character varying, "credits" character varying, "description" text, "apidae_object_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
108
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170513121215"]]
109
+  (0.4ms) COMMIT
110
+ Migrating to RenameObjectsSelectionsTable (20170513205932)
111
+  (33.6ms) BEGIN
112
+  (0.5ms) ALTER TABLE "apidae_objects_apidae_selections" RENAME TO "apidae_objects_selections"
113
+  (0.2ms) ALTER INDEX "apidae_objects_apidae_selections_pkey" RENAME TO "apidae_objects_selections_pkey"
114
+  (0.2ms) ALTER TABLE "public"."apidae_objects_apidae_selections_id_seq" RENAME TO "apidae_objects_selections_id_seq"
115
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170513205932"]]
116
+  (0.2ms) COMMIT
117
+ Migrating to AddEntityDataToObjects (20170720161134)
118
+  (0.1ms) BEGIN
119
+  (0.3ms) ALTER TABLE "apidae_objects" ADD "entity_data" text
120
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170720161134"]]
121
+  (40.7ms) COMMIT
122
+ Migrating to CreateApidaeFileImports (20170730102424)
123
+  (0.3ms) BEGIN
124
+  (47.6ms) CREATE TABLE "apidae_file_imports" ("id" serial NOT NULL PRIMARY KEY, "status" character varying, "remote_file" character varying, "created" integer, "updated" integer, "deleted" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
125
+ ActiveRecord::SchemaMigration Create (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170730102424"]]
126
+  (1.2ms) COMMIT
127
+ Migrating to CreateApidaeExports (20171025075304)
128
+  (40.4ms) BEGIN
129
+  (5.7ms) CREATE TABLE "apidae_exports" ("id" serial NOT NULL PRIMARY KEY, "status" character varying, "remote_status" character varying, "oneshot" boolean, "reset" boolean, "file_url" character varying, "confirm_url" character varying, "project_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
130
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171025075304"]]
131
+  (0.3ms) COMMIT
132
+ Migrating to CreateApidaeSelectionObjects (20180217222410)
133
+  (40.4ms) BEGIN
134
+  (4.2ms) CREATE TABLE "apidae_selection_objects" ("id" bigserial primary key, "apidae_selection_id" integer, "apidae_object_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
135
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180217222410"]]
136
+  (0.4ms) COMMIT
137
+ Migrating to ChangeTextColumnsToJson (20180218172704)
138
+  (32.6ms) BEGIN
139
+  (6.8ms) ALTER TABLE "apidae_objects" ALTER COLUMN "pictures_data" TYPE jsonb USING pictures_data::text::jsonb
140
+  (3.3ms) ALTER TABLE "apidae_objects" ALTER COLUMN "type_data" TYPE jsonb USING type_data::text::jsonb
141
+  (3.3ms) ALTER TABLE "apidae_objects" ALTER COLUMN "entity_data" TYPE jsonb USING entity_data::text::jsonb
142
+  (3.0ms) ALTER TABLE "apidae_objects" ALTER COLUMN "contact" TYPE jsonb USING contact::text::jsonb
143
+  (2.6ms) ALTER TABLE "apidae_objects" ALTER COLUMN "address" TYPE jsonb USING address::text::jsonb
144
+  (2.8ms) ALTER TABLE "apidae_objects" ALTER COLUMN "openings" TYPE jsonb USING openings::text::jsonb
145
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180218172704"]]
146
+  (3.7ms) COMMIT
147
+ Migrating to AddServiceDataToApidaeObjects (20180218231319)
148
+  (0.5ms) BEGIN
149
+  (0.5ms) ALTER TABLE "apidae_objects" ADD "service_data" jsonb
150
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180218231319"]]
151
+  (40.8ms) COMMIT
152
+ Migrating to AddRatesDataToApidaeObjects (20180222104915)
153
+  (0.2ms) BEGIN
154
+  (0.4ms) ALTER TABLE "apidae_objects" ADD "rates_data" jsonb
155
+  (41.4ms) ALTER TABLE "apidae_objects" DROP COLUMN "rates"
156
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222104915"]]
157
+  (0.4ms) COMMIT
158
+ Migrating to RenameOpeningsToOpeningsData (20180222105302)
159
+  (0.2ms) BEGIN
160
+  (0.3ms) ALTER TABLE "apidae_objects" RENAME COLUMN "openings" TO "openings_data"
161
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222105302"]]
162
+  (40.6ms) COMMIT
163
+ Migrating to AddAttachmentsDataToApidaeObjects (20180307164936)
164
+  (0.2ms) BEGIN
165
+  (0.5ms) ALTER TABLE "apidae_objects" ADD "attachments_data" jsonb
166
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180307164936"]]
167
+  (37.6ms) COMMIT
168
+ Migrating to CreateApidaeReferences (20180307170349)
169
+  (0.2ms) BEGIN
170
+  (85.3ms) CREATE TABLE "apidae_references" ("id" bigserial primary key, "apidae_id" integer, "apidae_type" character varying, "label_data" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
171
+  (41.1ms) CREATE UNIQUE INDEX "index_apidae_references_on_apidae_id" ON "apidae_references" ("apidae_id")
172
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180307170349"]]
173
+  (41.1ms) COMMIT
174
+ Migrating to AddTagsDataToApidaeObjects (20180314093512)
175
+  (81.8ms) BEGIN
176
+  (0.3ms) ALTER TABLE "apidae_objects" ADD "tags_data" jsonb
177
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180314093512"]]
178
+  (40.8ms) COMMIT
179
+ Migrating to AddMetaDataToApidaeObjects (20180314132631)
180
+  (0.2ms) BEGIN
181
+  (0.3ms) ALTER TABLE "apidae_objects" ADD "meta_data" jsonb
182
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180314132631"]]
183
+  (41.0ms) COMMIT
184
+ Migrating to RemoveApidaeIdUnicity (20180319143954)
185
+  (0.1ms) BEGIN
186
+  (0.5ms) DROP INDEX "index_apidae_references_on_apidae_id"
187
+  (1.1ms) CREATE INDEX "index_apidae_references_on_apidae_id" ON "apidae_references" ("apidae_id")
188
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180319143954"]]
189
+  (0.5ms) COMMIT
190
+ Migrating to AddLocationDataToApidaeObjects (20180417164604)
191
+  (0.3ms) BEGIN
192
+  (0.3ms) ALTER TABLE "apidae_objects" ADD "location_data" jsonb
193
+ ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180417164604"]]
194
+  (23.5ms) COMMIT
195
+ Migrating to RemoveAddressFromApidaeObjects (20180417165744)
196
+  (0.2ms) BEGIN
197
+  (0.5ms) ALTER TABLE "apidae_objects" DROP COLUMN "address"
198
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180417165744"]]
199
+  (23.3ms) COMMIT
200
+ Migrating to RemoveLatLngFromApidaeObjects (20180417171344)
201
+  (0.2ms) BEGIN
202
+  (0.6ms) ALTER TABLE "apidae_objects" DROP COLUMN "latitude"
203
+  (0.7ms) ALTER TABLE "apidae_objects" DROP COLUMN "longitude"
204
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180417171344"]]
205
+  (20.9ms) COMMIT
206
+ Migrating to AddDescriptionDataToApidaeObjects (20180418141248)
207
+  (0.2ms) BEGIN
208
+  (0.4ms) ALTER TABLE "apidae_objects" ADD "description_data" jsonb
209
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180418141248"]]
210
+  (22.7ms) COMMIT
211
+ Migrating to RemoveDescColumnsFromApidaeObjects (20180418141305)
212
+  (0.2ms) BEGIN
213
+  (0.4ms) ALTER TABLE "apidae_objects" DROP COLUMN "short_desc"
214
+  (0.2ms) ALTER TABLE "apidae_objects" DROP COLUMN "long_desc"
215
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180418141305"]]
216
+  (41.3ms) COMMIT
217
+ Migrating to AddMetaDataToApidaeReferences (20180424141656)
218
+  (0.2ms) BEGIN
219
+  (0.4ms) ALTER TABLE "apidae_references" ADD "meta_data" jsonb
220
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180424141656"]]
221
+  (40.2ms) COMMIT
222
+ Migrating to RemoveInseeCodeUnicity (20180519170210)
223
+  (0.2ms) BEGIN
224
+  (0.3ms) DROP INDEX "index_apidae_towns_on_insee_code"
225
+  (41.9ms) CREATE INDEX "index_apidae_towns_on_insee_code" ON "apidae_towns" ("insee_code")
226
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180519170210"]]
227
+  (2.8ms) COMMIT
228
+ Migrating to DestroyAttachedFiles (20180521211735)
229
+  (0.1ms) BEGIN
230
+  (37.9ms) DROP TABLE "apidae_attached_files"
231
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180521211735"]]
232
+  (1.2ms) COMMIT
233
+ Migrating to RenameObjectsToObj (20180625050400)
234
+  (0.2ms) BEGIN
235
+  (0.3ms) ALTER TABLE "apidae_objects" RENAME TO "apidae_objs"
236
+  (0.2ms) ALTER INDEX "apidae_objects_pkey" RENAME TO "apidae_objs_pkey"
237
+  (0.2ms) ALTER TABLE "public"."apidae_objects_id_seq" RENAME TO "apidae_objs_id_seq"
238
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180625050400"]]
239
+  (40.7ms) COMMIT
240
+ Migrating to AddProjectIdToSelections (20181024072424)
241
+  (0.3ms) BEGIN
242
+  (0.4ms) ALTER TABLE "apidae_selections" ADD "apidae_project_id" integer
243
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20181024072424"]]
244
+  (34.0ms) COMMIT
245
+ Migrating to CreateApidaeProjects (20181024072843)
246
+  (0.3ms) BEGIN
247
+  (43.8ms) CREATE TABLE "apidae_projects" ("id" bigserial primary key, "name" character varying, "apidae_id" integer, "api_key" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
248
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20181024072843"]]
249
+  (0.5ms) COMMIT
250
+ Migrating to AddApidaeIdToApidaeFileImports (20190111162443)
251
+  (40.4ms) BEGIN
252
+  (0.3ms) ALTER TABLE "apidae_file_imports" ADD "apidae_id" integer
253
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190111162443"]]
254
+  (1.9ms) COMMIT
255
+ Migrating to UpgradeApidaeObjsTitleDataType (20190123142628)
256
+  (0.1ms) BEGIN
257
+  (0.3ms) ALTER TABLE "apidae_objs" ADD "title_data" jsonb
258
+ Apidae::Obj Load (0.4ms) SELECT "apidae_objs".* FROM "apidae_objs"
259
+  (0.3ms) ALTER TABLE "apidae_objs" DROP COLUMN "title"
260
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190123142628"]]
261
+  (40.4ms) COMMIT
262
+ Migrating to AddBookingDataToApidaeObjs (20190123160046)
263
+  (0.2ms) BEGIN
264
+  (0.3ms) ALTER TABLE "apidae_objs" ADD "booking_data" jsonb
265
+ Apidae::Obj Load (0.3ms) SELECT "apidae_objs".* FROM "apidae_objs"
266
+  (0.3ms) ALTER TABLE "apidae_objs" DROP COLUMN "reservation"
267
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190123160046"]]
268
+  (40.1ms) COMMIT
269
+ Migrating to AddLocalesDataToApidaeProjects (20190123214635)
270
+  (0.2ms) BEGIN
271
+  (0.4ms) ALTER TABLE "apidae_projects" ADD "locales_data" character varying
272
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190123214635"]]
273
+  (22.4ms) COMMIT
274
+ Migrating to AddVersionToApidaeObjs (20190124162543)
275
+  (0.2ms) BEGIN
276
+  (0.5ms) ALTER TABLE "apidae_objs" ADD "version" character varying
277
+  (0.2ms) ALTER TABLE "apidae_objs" ADD "root_obj_id" integer
278
+  (0.9ms) ALTER TABLE "apidae_projects" ADD "versions_data" character varying
279
+ Apidae::Obj Update All (0.5ms) UPDATE "apidae_objs" SET "version" = 'STANDARD' WHERE "apidae_objs"."root_obj_id" IS NULL
280
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190124162543"]]
281
+  (40.7ms) COMMIT
282
+ Migrating to MigrateLocalizedApidaeObjFields (20190127210921)
283
+  (0.3ms) BEGIN
284
+ Apidae::Obj Load (0.6ms) SELECT "apidae_objs".* FROM "apidae_objs" WHERE "apidae_objs"."root_obj_id" IS NULL
285
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190127210921"]]
286
+  (39.7ms) COMMIT
287
+ Migrating to MigrateLocalizedApidaeReferences (20190127213602)
288
+  (0.2ms) BEGIN
289
+ Apidae::Reference Load (0.6ms) SELECT "apidae_references".* FROM "apidae_references"
290
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190127213602"]]
291
+  (40.5ms) COMMIT
292
+ Migrating to MigrateDescApidaeObjFields (20190304142446)
293
+  (0.4ms) BEGIN
294
+ Apidae::Obj Load (0.5ms) SELECT "apidae_objs"."id", "root_obj_id", "apidae_objs"."description_data" FROM "apidae_objs" WHERE "apidae_objs"."root_obj_id" IS NULL
295
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190304142446"]]
296
+  (20.7ms) COMMIT
297
+ Migrating to AddIndexOnApidaeObj (20190418133435)
298
+  (0.4ms) BEGIN
299
+  (20.4ms) CREATE INDEX "apidae_objs_apidae_id" ON "apidae_objs" ("apidae_id")
300
+  (1.0ms) CREATE INDEX "apidae_objs_root_obj_id" ON "apidae_objs" ("root_obj_id")
301
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190418133435"]]
302
+  (0.4ms) COMMIT
303
+ Migrating to AddDescriptionToApidaeTowns (20190517153215)
304
+  (0.1ms) BEGIN
305
+  (0.6ms) ALTER TABLE "apidae_towns" ADD "description" character varying
306
+ ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190517153215"]]
307
+  (21.5ms) COMMIT
308
+ Migrating to AddLastUpdateToApidaeOjbs (20200111214145)
309
+  (0.2ms) BEGIN
310
+  (0.4ms) ALTER TABLE "apidae_objs" ADD "last_update" timestamp
311
+ ActiveRecord::SchemaMigration Create (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200111214145"]]
312
+  (21.4ms) COMMIT
313
+ Migrating to AddOwnerDataToApidaeObjs (20200111214631)
314
+  (0.3ms) BEGIN
315
+  (0.4ms) ALTER TABLE "apidae_objs" ADD "owner_data" jsonb
316
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200111214631"]]
317
+  (23.2ms) COMMIT
318
+ Migrating to AddApidaeTypeIndexOnReferences (20200224130804)
319
+  (0.2ms) BEGIN
320
+  (23.3ms) CREATE INDEX "index_apidae_references_on_apidae_type" ON "apidae_references" ("apidae_type")
321
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200224130804"]]
322
+  (0.4ms) COMMIT
323
+ Migrating to AddTownInseeCodeIndexToObjs (20200224145802)
324
+  (0.1ms) BEGIN
325
+  (24.5ms) CREATE INDEX "index_apidae_objs_on_town_insee_code" ON "apidae_objs" ("town_insee_code")
326
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200224145802"]]
327
+  (0.4ms) COMMIT
328
+ Migrating to AddVersionDataToApidaeObjs (20200312150008)
329
+  (0.2ms) BEGIN
330
+  (0.4ms) ALTER TABLE "apidae_objs" ADD "version_data" jsonb
331
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200312150008"]]
332
+  (24.0ms) COMMIT
333
+ Migrating to AddVersionIndexOnApidaeObjs (20200312150904)
334
+  (0.7ms) BEGIN
335
+  (21.8ms) CREATE UNIQUE INDEX "index_apidae_objs_on_root_obj_id_and_version" ON "apidae_objs" ("root_obj_id", "version")
336
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200312150904"]]
337
+  (0.3ms) COMMIT
338
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
339
+  (0.2ms) BEGIN
340
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2021-07-08 09:47:54.615597"], ["updated_at", "2021-07-08 09:47:54.615597"]]
341
+  (0.3ms) COMMIT
342
+  (0.3ms) SELECT pg_advisory_unlock(6140174353533887940)
343
+  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
344
+  (0.2ms) SELECT pg_try_advisory_lock(6140174353533887940)
345
+  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
346
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
347
+  (0.2ms) BEGIN
348
+  (0.1ms) COMMIT
349
+  (0.2ms) SELECT pg_advisory_unlock(6140174353533887940)
350
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
351
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
352
+
353
+ Being able to do this is deprecated. Autoloading during initialization is going
354
+ to be an error condition in future versions of Rails.
355
+
356
+ Reloading does not reboot the application, and therefore code executed during
357
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
358
+ the expected changes won't be reflected in that stale Module object.
359
+
360
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
361
+
362
+ In order to autoload safely at boot time, please wrap your code in a reloader
363
+ callback this way:
364
+
365
+ Rails.application.reloader.to_prepare do
366
+ # Autoload classes and modules needed at boot time here.
367
+ end
368
+
369
+ That block runs when the application boots, and every time there is a reload.
370
+ For historical reasons, it may run twice, so it has to be idempotent.
371
+
372
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
373
+ Rails autoloads and reloads.
374
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)
375
+  (170.6ms) SELECT COUNT(*) FROM "apidae_objs" WHERE "apidae_objs"."root_obj_id" IS NULL
376
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
377
+
378
+ Being able to do this is deprecated. Autoloading during initialization is going
379
+ to be an error condition in future versions of Rails.
380
+
381
+ Reloading does not reboot the application, and therefore code executed during
382
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
383
+ the expected changes won't be reflected in that stale Module object.
384
+
385
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
386
+
387
+ In order to autoload safely at boot time, please wrap your code in a reloader
388
+ callback this way:
389
+
390
+ Rails.application.reloader.to_prepare do
391
+ # Autoload classes and modules needed at boot time here.
392
+ end
393
+
394
+ That block runs when the application boots, and every time there is a reload.
395
+ For historical reasons, it may run twice, so it has to be idempotent.
396
+
397
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
398
+ Rails autoloads and reloads.
399
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)