athar 0.2.0 → 0.2.1

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: '078258b806e8803d8c53908c23db272a425f1bfced177c80748cecb2afb96a0e'
4
- data.tar.gz: 2e8435f0a14564b17085dddca4b1739c10b8ea06fdd4610592cc42a5a0390785
3
+ metadata.gz: 5b0ef1986b6cadc08da710ef20abb9526c86f097bc032bf881ea9edb669884cd
4
+ data.tar.gz: 0cbadc431bdcc7c390f3e7e4d4e9bb8f2f80c269f770c7b855228fd1988da8b1
5
5
  SHA512:
6
- metadata.gz: af56062074cc9a29881321e7b8bd97e9d3758652f32118322c95a0e7a907ea9b3e890a7e534599b598b3a748183fae386ac2e641bcf012174d0fb92eda7414dc
7
- data.tar.gz: 9e98d6d11ce1dc73727da90ba060bcd29d7c4df399699c38dbe2253cf91d5b65d8fb68346dfadfcc937f4bd806fd5102f8e7c52b3a35759478ae61fea67bbec2
6
+ metadata.gz: 05d969a0d558f38df5377489cadf8474c224838613714df374759e60a558a42de329d345b9aebe827a5b77bdf5f49aa57d96eaacc48525a56b6e3d85e3d9f596
7
+ data.tar.gz: 84b6440c8e7f7b2225c03c3440b469dae05aafb68aeee4ef7cd1a7972e361d10036acdc1f3b076d4824246951dfb9fa4845630ec350b2cd07cfa4b7fda3d2700
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.1] - 2026-05-06
10
+
11
+ ### Fixed
12
+
13
+ - Fixed `athar:install --update` migrations to replace SQL functions without dropping them, avoiding PostgreSQL dependency errors when existing triggers depend on `athar_capture_delete()`.
14
+
9
15
  ## [0.2.0] - 2026-05-05
10
16
 
11
17
  ### Added
data/lib/athar/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Athar
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -60,11 +60,13 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
60
60
  drop_table :athar_deletions if table_exists?(:athar_deletions)
61
61
  <% end -%>
62
62
 
63
+ <% unless update? -%>
63
64
  execute(<<~SQL)
64
65
  <% function_drops.each do |drop_sql| -%>
65
66
  <%= drop_sql %>
66
67
  <% end -%>
67
68
  SQL
69
+ <% end -%>
68
70
  end
69
71
  <% unless update? -%>
70
72
  private
@@ -53,9 +53,15 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
53
53
  <% elsif function_definition[:previous_version] == function_definition[:version] -%>
54
54
  # <%= function_definition[:name] %> is already at version <%= function_definition[:version] %>; nothing to do.
55
55
  <% else -%>
56
- update_function :<%= function_definition[:name] %>,
57
- version: <%= function_definition[:version] %>,
58
- revert_to_version: <%= function_definition[:previous_version] %>
56
+ reversible do |dir|
57
+ dir.up do
58
+ create_function :<%= function_definition[:name] %>, version: <%= function_definition[:version] %>
59
+ end
60
+
61
+ dir.down do
62
+ create_function :<%= function_definition[:name] %>, version: <%= function_definition[:previous_version] %>
63
+ end
64
+ end
59
65
  <% end -%>
60
66
  <% end -%>
61
67
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: athar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Hamdi Ali Fadel