Skip to content

Commit

Permalink
invalid options the other way
Browse files Browse the repository at this point in the history
  • Loading branch information
BuonOmo committed Jan 11, 2024
1 parent dbb4c78 commit c6caf7d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
21 changes: 0 additions & 21 deletions test/cases/migration/invalid_options_test.rb

This file was deleted.

15 changes: 14 additions & 1 deletion test/excludes/ActiveRecord/Migration/InvalidOptionsTest.rb
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
exclude :invalid_add_column_option_exception_message, "Replaced by local version"
module Ext
def invalid_add_column_option_exception_message(key)
default_keys = [":limit", ":precision", ":scale", ":default", ":null", ":collation", ":comment", ":primary_key", ":if_exists", ":if_not_exists"]

# PostgreSQL specific options
default_keys.concat([":array", ":using", ":cast_as", ":as", ":type", ":enum_type", ":stored"])

# CockroachDB specific options
default_keys.concat([":srid", ":has_z", ":has_m", ":geographic", ":spatial_type", ":hidden"])

"Unknown key: :#{key}. Valid keys are: #{default_keys.join(", ")}"
end
end
prepend Ext

0 comments on commit c6caf7d

Please sign in to comment.