diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-06-25 20:43:09 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-06-25 21:17:27 +0900 |
commit | 59c218ea9b41e3ef5cef571f31fb83a7ec72e9a4 (patch) | |
tree | fca44d86e251af04aec2ea779bb59efbd27bc3ee /activerecord/lib | |
parent | 6da5f6b451e27d59c2492e504350d0fc70c37e3a (diff) | |
download | rails-59c218ea9b41e3ef5cef571f31fb83a7ec72e9a4.tar.gz rails-59c218ea9b41e3ef5cef571f31fb83a7ec72e9a4.tar.bz2 rails-59c218ea9b41e3ef5cef571f31fb83a7ec72e9a4.zip |
Remove unnecessary `assert_valid_default`
This was added at c7c3f73 but it never raised because MySQL cannot
create text/blob columns with a default value.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql/column.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql/column.rb b/activerecord/lib/active_record/connection_adapters/mysql/column.rb index 9c45fdd44a..ea554b188c 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/column.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/column.rb @@ -6,7 +6,6 @@ module ActiveRecord def initialize(*) super - assert_valid_default extract_default end @@ -38,12 +37,6 @@ module ActiveRecord @default = null || strict ? nil : '' end end - - def assert_valid_default - if blob_or_text_column? && default.present? - raise ArgumentError, "#{type} columns cannot have a default value: #{default.inspect}" - end - end end end end |