aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/mysql/column.rb
Commit message (Collapse)AuthorAgeFilesLines
* Simplify the regex for `unsigned?` methodRyuta Kamizono2016-12-111-2/+1
| | | | | It is enough to distinguish only the trailing `unsigned` and `unsigned zerofill`.
* [ci skip] Document regex changeAlex Kitchens2016-12-061-0/+1
|
* Fix that unsigned with zerofill is treated as signedRyuta Kamizono2016-11-271-1/+1
| | | | Fixes #27125.
* Use Regexp#match? rather than Regexp#===Ryuta Kamizono2016-10-261-2/+2
| | | | Follow up to 99cf7558000090668b137085bfe6bcc06c4571dc.
* Remove unused `blob_or_text_column?` methodRyuta Kamizono2016-08-191-4/+0
|
* Remove text default treated as an empty string in non-strict modeRyuta Kamizono2016-08-191-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strict mode controls how MySQL handles invalid or missing values in data-change statements such as INSERT or UPDATE. If strict mode is not in effect, MySQL inserts adjusted values for invalid or missing values and produces warnings. ```ruby def test_mysql_not_null_defaults_non_strict using_strict(false) do with_mysql_not_null_table do |klass| record = klass.new assert_nil record.non_null_integer assert_nil record.non_null_string assert_nil record.non_null_text assert_nil record.non_null_blob record.save! record.reload assert_equal 0, record.non_null_integer assert_equal "", record.non_null_string assert_equal "", record.non_null_text assert_equal "", record.non_null_blob end end end ``` It is inconsistent with other types that only text/blob defaults treated as an empty string. This commit fixes the inconsistency.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-4/+4
|
* applies new string literal convention in activerecord/libXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Remove unnecessary `assert_valid_default`Ryuta Kamizono2016-06-251-7/+0
| | | | | This was added at c7c3f73 but it never raised because MySQL cannot create text/blob columns with a default value.
* Extract `MySQL::Column` class to `connection_adapters/mysql/column.rb`Ryuta Kamizono2016-01-111-0/+50