legion-data 1.6.16 → 1.6.17

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: 458456d016a717f8ee9397f29f01b118ecb7e8a103142defe337788d72762176
4
- data.tar.gz: cac5a1f8a0bb86ec3087da754d2432ae97ebdc65b003c4ee1aa5e9c9570cc03a
3
+ metadata.gz: 751fcaf222628502475f1d3fd7563f1162836d7de4e3a2949724c2324387890e
4
+ data.tar.gz: c6787226b1fce54751d250bf27fecb4ada9538f7c2d466bb9215d4386ae607b8
5
5
  SHA512:
6
- metadata.gz: 2303a3358441efcea756d106d92a102858eb3534109df30b294925213ae8cba7559969e7f2d01b6ec7ad5bbe1bdca9bf1c5af7d92e1d9fc647eeb8230c8c9269
7
- data.tar.gz: e50d02ec9745f7dc178bb53ca222c104e822505190b5bacf7ed404e9a61480b4a3361817b220a399b1cd95d323503d66046050e6acabacca2fce493b842e3500
6
+ metadata.gz: 1b52c53a9993f31862973c3b4117b985c21aa5a344979083dcd69b912c00be6c42461e45a5e583970dfe9ae2824841e869a89d4cdf3eab46fb15f6a66d698e91
7
+ data.tar.gz: f35cbc4955c14f93a4c5fea5188fd766cf8b09061467d9764de56835ff7a2f95ada6c5e976c3fcf6e41b2af69f850dbf0e6e53d66d98be6ded80db6894cc8cf3
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.6.17] - 2026-03-30
6
+
7
+ ### Added
8
+ - Migration 060: L0/L1 summary columns on `apollo_entries` (`summary_l0` VARCHAR 500, `summary_l1` TEXT, `knowledge_tier` VARCHAR 4 default 'L2', `parent_entry_id` UUID, `l0_generated_at` timestamptz, `l1_generated_at` timestamptz) — postgres only
9
+ - Migration 060: named indexes `idx_apollo_knowledge_tier` and `idx_apollo_parent_entry` on `apollo_entries`
10
+ - Spec for migration 060 covering column presence, types, nullability, defaults, indexes, and idempotency
11
+
5
12
  ## [1.6.16] - 2026-03-30
6
13
 
7
14
  ### Fixed
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ Sequel.migration do
4
+ up do
5
+ next unless adapter_scheme == :postgres
6
+ next unless table_exists?(:apollo_entries)
7
+
8
+ existing_columns = schema(:apollo_entries).map(&:first)
9
+
10
+ alter_table(:apollo_entries) do
11
+ add_column :summary_l0, String, size: 500, null: true unless existing_columns.include?(:summary_l0)
12
+ add_column :summary_l1, :text, null: true unless existing_columns.include?(:summary_l1)
13
+ add_column :knowledge_tier, String, size: 4, null: false, default: 'L2' unless existing_columns.include?(:knowledge_tier)
14
+ add_column :parent_entry_id, :uuid, null: true unless existing_columns.include?(:parent_entry_id)
15
+ add_column :l0_generated_at, :timestamptz, null: true unless existing_columns.include?(:l0_generated_at)
16
+ add_column :l1_generated_at, :timestamptz, null: true unless existing_columns.include?(:l1_generated_at)
17
+ end
18
+
19
+ add_index :apollo_entries, :knowledge_tier, name: :idx_apollo_knowledge_tier, if_not_exists: true
20
+ add_index :apollo_entries, :parent_entry_id, name: :idx_apollo_parent_entry, if_not_exists: true
21
+ end
22
+
23
+ down do
24
+ next unless adapter_scheme == :postgres
25
+ next unless table_exists?(:apollo_entries)
26
+
27
+ existing_columns = schema(:apollo_entries).map(&:first)
28
+
29
+ alter_table(:apollo_entries) do
30
+ drop_column :summary_l0 if existing_columns.include?(:summary_l0)
31
+ drop_column :summary_l1 if existing_columns.include?(:summary_l1)
32
+ drop_column :knowledge_tier if existing_columns.include?(:knowledge_tier)
33
+ drop_column :parent_entry_id if existing_columns.include?(:parent_entry_id)
34
+ drop_column :l0_generated_at if existing_columns.include?(:l0_generated_at)
35
+ drop_column :l1_generated_at if existing_columns.include?(:l1_generated_at)
36
+ end
37
+ end
38
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Data
5
- VERSION = '1.6.16'
5
+ VERSION = '1.6.17'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.16
4
+ version: 1.6.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity
@@ -189,6 +189,7 @@ files:
189
189
  - lib/legion/data/migrations/057_add_routing_key_to_runners.rb
190
190
  - lib/legion/data/migrations/058_add_audit_records.rb
191
191
  - lib/legion/data/migrations/059_create_chains.rb
192
+ - lib/legion/data/migrations/060_add_knowledge_tiers.rb
192
193
  - lib/legion/data/model.rb
193
194
  - lib/legion/data/models/apollo_access_log.rb
194
195
  - lib/legion/data/models/apollo_entry.rb