diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 12:07:59 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 12:07:59 +0000 |
commit | 4247e67be1faa9d52691757dad954a7fa63e8bfe (patch) | |
tree | f2a8acc41b1b16c2c1050abc61ecb8a07f44bb2f /config | |
parent | c0d8f9f3f962df6bfcc70440432da55d67307189 (diff) | |
download | gitlab-ce-4247e67be1faa9d52691757dad954a7fa63e8bfe.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/postgresql_limit_fix.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/config/initializers/postgresql_limit_fix.rb b/config/initializers/postgresql_limit_fix.rb deleted file mode 100644 index 4224d857e8a..00000000000 --- a/config/initializers/postgresql_limit_fix.rb +++ /dev/null @@ -1,27 +0,0 @@ -if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) - class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter - module LimitFilter - def add_column(table_name, column_name, type, options = {}) - options.delete(:limit) if type == :text - super(table_name, column_name, type, options) - end - - def change_column(table_name, column_name, type, options = {}) - options.delete(:limit) if type == :text - super(table_name, column_name, type, options) - end - end - - prepend ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::LimitFilter - - class TableDefinition - def text(*args) - options = args.extract_options! - options.delete(:limit) - column_names = args - type = :text - column_names.each { |name| column(name, type, options) } - end - end - end -end |