harmonia 0.2.2 → 0.2.3

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
2
  SHA256:
3
- metadata.gz: 28c0e7e7f87cdbf680cb961b01ef7f599af2c662bebe3c8dd857db2b172e43d6
4
- data.tar.gz: 6355cba5ee75d3fcca62040079a70342f72bc6f13ca6554d8671b9af53d0218a
3
+ metadata.gz: 6855db28daa85553fa8479d6dd6217c43ae5c008be01c0b5f92b3154ce183f9c
4
+ data.tar.gz: 9b44c5dd79d2a5626053541bcc0a869025e37ecee53c97018eae853a4004d440
5
5
  SHA512:
6
- metadata.gz: b258047a77289e9b4dc8c9e5de0096359a927f761bfee5c02105854973b7afa6314e1d1b8496dc1e0bac73c023e373d14562041bb57a3eac6105736d1888f330
7
- data.tar.gz: c485199ad2448e3810dc3c09dda6f73b71a55dd17ec4be924cf5d49483f7761dbbb2465b8cafb67adf5c104a46f45dded59ef34aa630cf02b915bef0c34c0e5e
6
+ metadata.gz: 03056f3bafcbae9a2b69251fe7de63af424fe8bc216c5f18c228b390f47a6baaef8f041b9f1f66ed51f0f0be8ccf1c6e5653649ff55312be10feca45cf71f0c4
7
+ data.tar.gz: bf9bde1fd412e5af7b04a5e583fef2441e12ffb20bd55822d33e41f8bfa9e59afce719e5435d6732ee9885492aca376321e9028224c436d6004af7f726337255
@@ -27,6 +27,10 @@ module Harmonia
27
27
  migration_template "create_harmonia_syncs.rb", "db/migrate/create_harmonia_syncs.rb"
28
28
  end
29
29
 
30
+ def generate_failed_ids_migration
31
+ migration_template "add_failed_ids_to_harmonia_syncs.rb", "db/migrate/add_failed_ids_to_harmonia_syncs.rb"
32
+ end
33
+
30
34
  def show_readme
31
35
  readme_content = <<~README
32
36
 
@@ -40,6 +44,7 @@ module Harmonia
40
44
  - app/models/application_record.rb (with to_fm extension)
41
45
  - app/models/harmonia/sync.rb
42
46
  - db/migrate/..._create_harmonia_syncs.rb
47
+ - db/migrate/..._add_failed_ids_to_harmonia_syncs.rb
43
48
 
44
49
  Next steps:
45
50
  1. Run migrations: rails db:migrate
@@ -57,7 +62,13 @@ module Harmonia
57
62
 
58
63
  # Required for migration_template to work
59
64
  def self.next_migration_number(dirname)
60
- Time.now.utc.strftime("%Y%m%d%H%M%S")
65
+ current = Time.now.utc.strftime("%Y%m%d%H%M%S")
66
+
67
+ @previous_migration_number = if defined?(@previous_migration_number) && @previous_migration_number >= current
68
+ (@previous_migration_number.to_i + 1).to_s
69
+ else
70
+ current
71
+ end
61
72
  end
62
73
  end
63
74
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddFailedIdsToHarmoniaSyncs < ActiveRecord::Migration[<%= Rails::VERSION::MAJOR %>.<%= Rails::VERSION::MINOR %>]
4
+ def change
5
+ unless column_exists?(:harmonia_syncs, :failed_fm_ids)
6
+ add_column :harmonia_syncs, :failed_fm_ids, :jsonb, default: {}
7
+ end
8
+
9
+ unless column_exists?(:harmonia_syncs, :failed_pg_ids)
10
+ add_column :harmonia_syncs, :failed_pg_ids, :jsonb, default: {}
11
+ end
12
+ end
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harmonia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kempen Automatisering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-24 00:00:00.000000000 Z
11
+ date: 2026-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trophonius
@@ -37,6 +37,7 @@ files:
37
37
  - lib/generators/harmonia/reverse_sync_generator.rb
38
38
  - lib/generators/harmonia/sync_generator.rb
39
39
  - lib/generators/harmonia/templates/activerecord_to_filemaker_syncer_template.rb
40
+ - lib/generators/harmonia/templates/add_failed_ids_to_harmonia_syncs.rb
40
41
  - lib/generators/harmonia/templates/add_filemaker_id_to_table.rb
41
42
  - lib/generators/harmonia/templates/application_record_extension.rb
42
43
  - lib/generators/harmonia/templates/create_harmonia_syncs.rb