You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ignores options passed in an options hash along with gin_trgm_ops relevant with pg_trgm extension.
This way concurrently: true, though provided, is not detected by linter.
Sequel.migrationdono_transactionupdoDB.execute('CREATE EXTENSION IF NOT EXISTS pg_trgm;')alter_table(:foos)doopts={name: :foos_bar_search_index,type: :gin,concurrently: true}add_index(Sequel.lit(" gin_trgm_ops"),opts)endendend
This is affecting our codebase as well. Folks have accidentally used ActiveRecord's algorithm: :concurrently in our codebae and no error was thrown by either rubocop-sequel or sequel.
Example:
Sequel.migrationdono_transactionchangedoalter_table:foodoadd_index:bar_id# ✅ `convention:Sequel/ConcurrentIndex` error thrownadd_index:baz_id,concurrently: true# ✅ No error thrownadd_index:qux_id,algorithm: :concurrently# ❌ No error thrownendendend
We should have better typing / linting for the options passed into the migration method
Ignores options passed in an
options
hash along with gin_trgm_ops relevant with pg_trgm extension.This way
concurrently: true
, though provided, is not detected by linter.Issue produced with the following version
The text was updated successfully, but these errors were encountered: