-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#4971] Add Ubuntu 18.04 LTS (Bionic) Support #5232
Conversation
if postgresql_version >= 100000 | ||
minvalue = select_value("SELECT seqmin FROM pg_sequence WHERE seqrelid = #{quote(quoted_sequence)}::regclass") | ||
else | ||
minvalue = select_value("SELECT min_value FROM #{quoted_sequence}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [83/80]
max_pk = select_value("SELECT MAX(#{quote_column_name pk}) FROM #{quote_table_name(table)}") | ||
if max_pk.nil? | ||
if postgresql_version >= 100000 | ||
minvalue = select_value("SELECT seqmin FROM pg_sequence WHERE seqrelid = #{quote(quoted_sequence)}::regclass") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [126/80]
|
||
if pk && sequence | ||
quoted_sequence = quote_table_name(sequence) | ||
max_pk = select_value("SELECT MAX(#{quote_column_name pk}) FROM #{quote_table_name(table)}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [104/80]
end | ||
|
||
if @logger && pk && !sequence | ||
@logger.warn "#{table} has primary key #{pk} with no default sequence" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [82/80]
module SchemaStatements | ||
# Resets the sequence of a table's primary key to the maximum value. | ||
def reset_pk_sequence!(table, pk = nil, sequence = nil) #:nodoc: | ||
unless pk and sequence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use && instead of and.
module ActiveRecord | ||
module ConnectionAdapters | ||
module PostgreSQL | ||
module SchemaStatements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing top-level module documentation comment.
require 'active_record/connection_adapters/postgresql/schema_statements' | ||
|
||
# | ||
# Monkey-patch the refused Rails 4.2 patch at https://github.com/rails/rails/pull /31330 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [91/80]
* Adds patch for Postgres 10 https://stackoverflow.com/a/51373732/387558 * Adds Cosmic repo for pdftk-java https://askubuntu.com/a/1028983
b4983e4
to
7767d2f
Compare
I think this will be resolved in 0.34 (drops ruby 2.0 and allows us to upgrade nokogiri to 1.8.5 which appears to include a fix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 yay!
Afterthought - I did not capture the error message but I had to upgrade Vagrant to get this to build (I had an older pre v2 version) |
Pre-v2 is pretty old. Although its not really written down anywhere, I've just considered that vagrant (and virtualbox) should be running on the most recent version unless there's a really good version not to do so. |
Yeah, more capturing this in case a reuser hits a similar problem long after I've forgotten about this |
Relevant issue(s)
Fixes #4971
Fixes #5025
What does this do?
Add Ubuntu 18.04 LTS (Bionic) Support
Implementation notes
Obvs ignoring the hound comments as its a patch that we can hopefully remove as we upgrade further.
constant ::Fixnum is deprecated
, but we're seeing those in CI anyway