ductwork 1.1.2 → 1.2.0
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 +4 -4
- data/CHANGELOG-PRO.md +5 -0
- data/CHANGELOG.md +5 -0
- data/lib/ductwork/migration_helper.rb +23 -0
- data/lib/ductwork/version.rb +1 -1
- data/lib/generators/ductwork/install/templates/db/create_ductwork_availabilities.rb +1 -10
- data/lib/generators/ductwork/update/templates/db/denormalize_pipeline_klass_on_availabilities.rb +2 -12
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 402e7de6f5703214be13a443e54a5b74f113500a22ad42727db969a7bcb39b69
|
|
4
|
+
data.tar.gz: 9889dd598476068548da0f6cf9e63cf94f72e6e124b837d3abe2994de6a2770f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2eb520b852ff56484b7afd3f89a525f4e444ba2a04a03ff3d97152bdad625cf5d393a2500a72bcdd2ca8a4122f726caaadcd8aa4c626e70e8ba6397ec84bd5df
|
|
7
|
+
data.tar.gz: 8667ad5225297be4b5c98383fbe0ad3766e18a33391912d110e9aae94bcaa5c9949089fb2c8f4eb0d6f0f17c8588626e82e6c7abe90aa0293a2081dffe8aef82
|
data/CHANGELOG-PRO.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Ductwork Pro Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.2]
|
|
4
|
+
|
|
5
|
+
- fix: remove unnecessary setting of configuration object during class-level evaluation - this catches up with OSS changes
|
|
6
|
+
- fix: pass extra step id argument when instantiating steps during execution - this catches up with current OSS changes
|
|
7
|
+
|
|
3
8
|
## [1.1.1]
|
|
4
9
|
|
|
5
10
|
- fix: use `Ductwork::DatabaseClock` instead of `Time.current` for every `started_at` Pro stamps, mirroring the OSS fix
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Ductwork Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.0]
|
|
4
|
+
|
|
5
|
+
- feat: add `add_availability_claim_index` and `remove_availability_claim_index` to `Ductwork::MigrationHelper`, which own the adapter-specific shape and the name of the availability claim index
|
|
6
|
+
- chore: build the availability claim index through the new migration helpers
|
|
7
|
+
|
|
3
8
|
## [1.1.2]
|
|
4
9
|
|
|
5
10
|
- fix: lazily create configuration
|
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
module Ductwork
|
|
4
4
|
module MigrationHelper
|
|
5
|
+
AVAILABILITY_CLAIM_INDEX_NAME = "index_ductwork_availabilities_on_claim_latest"
|
|
6
|
+
|
|
7
|
+
def add_availability_claim_index(extra_columns: [], where_extra: nil)
|
|
8
|
+
if mysql?
|
|
9
|
+
add_index :ductwork_availabilities,
|
|
10
|
+
[:pipeline_klass, :completed_at, *extra_columns, :started_at],
|
|
11
|
+
name: AVAILABILITY_CLAIM_INDEX_NAME
|
|
12
|
+
else
|
|
13
|
+
predicate = ["completed_at IS NULL", where_extra].compact.join(" AND ")
|
|
14
|
+
|
|
15
|
+
add_index :ductwork_availabilities,
|
|
16
|
+
%i[pipeline_klass started_at],
|
|
17
|
+
name: AVAILABILITY_CLAIM_INDEX_NAME,
|
|
18
|
+
where: predicate
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def remove_availability_claim_index
|
|
23
|
+
remove_index :ductwork_availabilities,
|
|
24
|
+
name: AVAILABILITY_CLAIM_INDEX_NAME,
|
|
25
|
+
if_exists: true
|
|
26
|
+
end
|
|
27
|
+
|
|
5
28
|
def create_ductwork_table(table_name, &block)
|
|
6
29
|
if postgresql?
|
|
7
30
|
create_table table_name, id: :uuid, &block
|
data/lib/ductwork/version.rb
CHANGED
|
@@ -26,15 +26,6 @@ class CreateDuctworkAvailabilities < Ductwork::Migration
|
|
|
26
26
|
add_index :ductwork_availabilities, :execution_id, unique: true
|
|
27
27
|
add_index :ductwork_availabilities, %i[id process_id]
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
add_index :ductwork_availabilities,
|
|
31
|
-
%i[pipeline_klass completed_at started_at],
|
|
32
|
-
name: "index_ductwork_availabilities_on_claim_latest"
|
|
33
|
-
else
|
|
34
|
-
add_index :ductwork_availabilities,
|
|
35
|
-
%i[pipeline_klass started_at],
|
|
36
|
-
name: "index_ductwork_availabilities_on_claim_latest",
|
|
37
|
-
where: "completed_at IS NULL"
|
|
38
|
-
end
|
|
29
|
+
add_availability_claim_index
|
|
39
30
|
end
|
|
40
31
|
end
|
data/lib/generators/ductwork/update/templates/db/denormalize_pipeline_klass_on_availabilities.rb
CHANGED
|
@@ -11,17 +11,7 @@ class DenormalizePipelineKlassOnAvailabilities < Ductwork::Migration
|
|
|
11
11
|
.update_all(pipeline_klass: "Pipeline")
|
|
12
12
|
|
|
13
13
|
change_column_null :ductwork_availabilities, :pipeline_klass, false
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if mysql?
|
|
17
|
-
add_index :ductwork_availabilities,
|
|
18
|
-
%i[pipeline_klass completed_at started_at],
|
|
19
|
-
name: "index_ductwork_availabilities_on_claim_latest"
|
|
20
|
-
else
|
|
21
|
-
add_index :ductwork_availabilities,
|
|
22
|
-
%i[pipeline_klass started_at],
|
|
23
|
-
name: "index_ductwork_availabilities_on_claim_latest",
|
|
24
|
-
where: "completed_at IS NULL"
|
|
25
|
-
end
|
|
14
|
+
remove_availability_claim_index
|
|
15
|
+
add_availability_claim_index
|
|
26
16
|
end
|
|
27
17
|
end
|