aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-1/+1
|
* Omit the default limit for float columns (#28041)Ryuta Kamizono2017-08-271-1/+1
|
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Should escape meta characters in regexpRyuta Kamizono2017-05-071-4/+4
|
* Simplify the regex for `unsigned?` methodRyuta Kamizono2016-12-111-1/+1
| | | | | It is enough to distinguish only the trailing `unsigned` and `unsigned zerofill`.
* Translate numeric value out of range to the specific exceptionRyuta Kamizono2016-12-061-2/+2
| | | | Raise `ActiveRecord::RangeError` when values that executed are out of range.
* Fix that unsigned with zerofill is treated as signedRyuta Kamizono2016-11-271-0/+1
| | | | Fixes #27125.
* Use Regexp#match? rather than Regexp#===Ryuta Kamizono2016-10-261-1/+1
| | | | Follow up to 99cf7558000090668b137085bfe6bcc06c4571dc.
* Followup of #24835Vipul A M2016-05-031-2/+2
| | | | Fix failing tests
* Dump `bigint` instead of `integer` with `limit: 8` for schema dumperRyuta Kamizono2016-03-111-1/+1
| | | | | | | | | | | | | | | | | | Before: ```ruby create_table "big_numbers", force: :cascade do |t| t.integer "bigint_column", limit: 8 end ``` After: ```ruby create_table "big_numbers", force: :cascade do |t| t.bigint "bigint_column" end ```
* These limits are now implicitMatthew Draper2015-12-181-1/+1
|
* Add `unsigned` types for numeric data types in MySQLRyuta Kamizono2015-09-181-0/+13
| | | | | | | | | | | In the case of using `unsigned` as the type: create_table :foos do |t| t.unsigned_integer :unsigned_integer t.unsigned_bigint :unsigned_bigint t.unsigned_float :unsigned_float t.unsigned_decimal :unsigned_decimal, precision: 10, scale: 2 end
* Add `unsigned` support for numeric data types in MySQLRyuta Kamizono2015-09-181-2/+24
| | | | | | | | | | | Example: create_table :foos do |t| t.integer :unsigned_integer, unsigned: true t.bigint :unsigned_bigint, unsigned: true t.float :unsigned_float, unsigned: true t.decimal :unsigned_decimal, unsigned: true, precision: 10, scale: 2 end
* make it possible to run AR tests with bin/testYves Senn2015-06-111-1/+1
|
* Closes rails/rails#18864: Renaming transactional fixtures to transactional testsBrandon Weiss2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I’m renaming all instances of `use_transcational_fixtures` to `use_transactional_tests` and “transactional fixtures” to “transactional tests”. I’m deprecating `use_transactional_fixtures=`. So anyone who is explicitly setting this will get a warning telling them to use `use_transactional_tests=` instead. I’m maintaining backwards compatibility—both forms will work. `use_transactional_tests` will check to see if `use_transactional_fixtures` is set and use that, otherwise it will use itself. But because `use_transactional_tests` is a class attribute (created with `class_attribute`) this requires a little bit of hoop jumping. The writer method that `class_attribute` generates defines a new reader method that return the value being set. Which means we can’t set the default of `true` using `use_transactional_tests=` as was done previously because that won’t take into account anyone using `use_transactional_fixtures`. Instead I defined the reader method manually and it checks `use_transactional_fixtures`. If it was set then it should be used, otherwise it should return the default, which is `true`. If someone uses `use_transactional_tests=` then it will overwrite the backwards-compatible method with whatever they set.
* Fix undesirable RangeError by Type::Integer. Add Type::UnsignedInteger.Ryuta Kamizono2014-12-121-0/+30