que 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -1
- data/bin/que +1 -1
- data/{bin → lib/que}/command_line_interface.rb +0 -0
- data/lib/que/migrations.rb +16 -3
- data/lib/que/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd8e2e7b77de787218a646c550cf38fddd52091c91422fdb5813b12fe1af775c
|
4
|
+
data.tar.gz: e9abc8a607b82db9b0ed925163ed4b21d61f7f2588b1dfd91bf8b558af3fa14c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55cea89090a9685c5001aba97794e0fa2246362da2b530b02808966e3a4487d07a908ec980d141ad76d59bd04065863fbc097af2ea78acefda110dfdb37cea48
|
7
|
+
data.tar.gz: 114317905799b63fcc9b4c5180a15f24da03e7937790e6b330d0d67c5a0d7df062c470dd2b8a98426f5ced795b5da6d435a647e9504b66ba669fb72953872f66
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
<!-- MarkdownTOC autolink=true -->
|
4
4
|
|
5
|
+
- [2.2.0 \(2022-08-29\)](#220-2022-08-29)
|
5
6
|
- [2.1.0 \(2022-08-25\)](#210-2022-08-25)
|
6
7
|
- [2.0.0 \(2022-08-25\)](#200-2022-08-25)
|
7
8
|
- [1.4.1 \(2022-07-24\)](#141-2022-07-24)
|
@@ -55,6 +56,20 @@
|
|
55
56
|
|
56
57
|
<!-- /MarkdownTOC -->
|
57
58
|
|
59
|
+
## 2.2.0 (2022-08-29)
|
60
|
+
|
61
|
+
- **Changed**:
|
62
|
+
+ When migrating, now raises an exception when the Que DB schema version is missing from the database. The migrations system records this version in a comment on the `que_jobs` table. [#379](https://github.com/que-rb/que/pull/379)
|
63
|
+
* > Que::Error: Cannot determine Que DB schema version.
|
64
|
+
>
|
65
|
+
> The que_jobs table is missing its comment recording the Que DB schema version. This is likely due to a bug in Rails schema dump in Rails 7 versions prior to 7.0.3, omitting comments - see https://github.com/que-rb/que/issues/363. Please determine the appropriate schema version from your migrations and record it manually by running the following SQL (replacing version as appropriate):
|
66
|
+
>
|
67
|
+
> COMMENT ON TABLE que_jobs IS 'version';
|
68
|
+
- **Removed**:
|
69
|
+
+ Removed support for upgrading directly from a version of Que prior to v0.5.0 (released on 2014-01-14), which introduced the migrations system. It's too difficult to handle the different DB schemas from prior to this.
|
70
|
+
- **Internal**:
|
71
|
+
+ Moved `command_line_interface.rb` from `bin/` to `lib/`. [#378](https://github.com/que-rb/que/pull/378)
|
72
|
+
|
58
73
|
## 2.1.0 (2022-08-25)
|
59
74
|
|
60
75
|
- **Added**:
|
@@ -65,7 +80,7 @@
|
|
65
80
|
This release contains a database migration. You will need to migrate Que to the latest database schema version (7). For example, on ActiveRecord and Rails 6:
|
66
81
|
|
67
82
|
```ruby
|
68
|
-
class
|
83
|
+
class UpdateQueTablesToVersion7 < ActiveRecord::Migration[6.0]
|
69
84
|
def up
|
70
85
|
Que.migrate!(version: 7)
|
71
86
|
end
|
data/bin/que
CHANGED
File without changes
|
data/lib/que/migrations.rb
CHANGED
@@ -48,14 +48,27 @@ module Que
|
|
48
48
|
# No table in the database at all.
|
49
49
|
0
|
50
50
|
elsif (d = result.first[:description]).nil?
|
51
|
-
#
|
52
|
-
|
53
|
-
1
|
51
|
+
# The table exists but the version comment is missing
|
52
|
+
_raise_db_version_comment_missing_error
|
54
53
|
else
|
55
54
|
d.to_i
|
56
55
|
end
|
57
56
|
end
|
58
57
|
|
58
|
+
# The que_jobs table could be missing the schema version comment either due to:
|
59
|
+
# - Being created before the migration system existed; or
|
60
|
+
# - A bug in Rails schema dump in some versions of Rails
|
61
|
+
# The former is the case on Que versions prior to v0.5.0 (2014-01-14). Upgrading directly from there is unsupported, so we just raise in all cases of the comment being missing
|
62
|
+
def _raise_db_version_comment_missing_error
|
63
|
+
raise Error, <<~ERROR
|
64
|
+
Cannot determine Que DB schema version.
|
65
|
+
|
66
|
+
The que_jobs table is missing its comment recording the Que DB schema version. This is likely due to a bug in Rails schema dump in Rails 7 versions prior to 7.0.3, omitting comments - see https://github.com/que-rb/que/issues/363. Please determine the appropriate schema version from your migrations and record it manually by running the following SQL (replacing version as appropriate):
|
67
|
+
|
68
|
+
COMMENT ON TABLE que_jobs IS 'version';
|
69
|
+
ERROR
|
70
|
+
end
|
71
|
+
|
59
72
|
def set_db_version(version)
|
60
73
|
i = version.to_i
|
61
74
|
Que.execute "COMMENT ON TABLE que_jobs IS '#{i}'" unless i.zero?
|
data/lib/que/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: que
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hanks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -45,7 +45,6 @@ files:
|
|
45
45
|
- auto/psql
|
46
46
|
- auto/test
|
47
47
|
- auto/test-postgres-14
|
48
|
-
- bin/command_line_interface.rb
|
49
48
|
- bin/que
|
50
49
|
- docker-compose.yml
|
51
50
|
- docs/README.md
|
@@ -53,6 +52,7 @@ files:
|
|
53
52
|
- lib/que/active_job/extensions.rb
|
54
53
|
- lib/que/active_record/connection.rb
|
55
54
|
- lib/que/active_record/model.rb
|
55
|
+
- lib/que/command_line_interface.rb
|
56
56
|
- lib/que/connection.rb
|
57
57
|
- lib/que/connection_pool.rb
|
58
58
|
- lib/que/job.rb
|