aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/column_definition_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused `Column#coder`Sean Griffin2014-05-281-20/+0
| | | | | It appears this property was added, but never actually used. It would be broken if it were, as it only type casts one way.
* Push limit to type objectsSean Griffin2014-05-221-3/+3
| | | | | Columns and injected types no longer have any conditionals based on the format of SQL type strings! Hooray!
* Delegate `Column#type` to the injected type objectSean Griffin2014-05-191-22/+22
| | | | | | | | | | | | | | | | The decision to wrap type registrations in a proc was made for two reasons. 1. Some cases need to make an additional decision based on the type (e.g. a `Decimal` with a 0 scale) 2. Aliased types are automatically updated if they type they point to is updated later. If a user or another adapter decides to change the object used for `decimal` columns, `numeric`, and `number` will automatically point to the new type, without having to track what types are aliased explicitly. Everything else here should be pretty straightforward. PostgreSQL ranges had to change slightly, since the `simplified_type` method is gone.
* Add a type object to Column constructorSean Griffin2014-05-171-22/+22
| | | | | | Part of #15134. In order to perform typecasting polymorphically, we need to add another argument to the constructor. The order was chosen to match the `oid_type` on `PostgreSQLColumn`.
* PostgreSQL determine `Column#type` through corresponding OID. #7814Yves Senn2014-04-011-2/+2
| | | | | | | | | | | | | I ran the whole test suite and compared the old to the new types. Following is the list of types that did change with this patch: ``` DIFFERENT TYPE FOR mood: NEW: enum, BEFORE: DIFFERENT TYPE FOR floatrange: NEW: floatrange, BEFORE: float ``` The `floatrange` is a custom type. The old type `float` was simply a coincidence form the name `floatrange` and our type-guessing.
* Fixed typo in column_definition_test.rb.Vajrasky Kok2014-02-051-2/+2
|
* decouple column definition from the database connectionAaron Patterson2013-03-221-3/+3
|
* remove knowledge of SQL from the column definition objectAaron Patterson2013-03-221-3/+4
|
* Add uuid type support to PostgreSQL adapterKonstantin Shabanov2012-06-141-6/+0
|
* PG column consults oid types when typecastingAaron Patterson2012-02-101-3/+6
|
* Create an AbstractMysqlAdapter to abstract the common code between ↵Jon Leighton2011-08-291-16/+16
| | | | MysqlAdapter and Mysql2Adapter.
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* column will use coder to typecase value when it is availableAaron Patterson2011-02-011-0/+6
|
* coders can be assigned to columnsAaron Patterson2011-02-011-0/+14
|
* namespace test so we can dry up constant lookupAaron Patterson2011-02-011-95/+99
|
* update tests for mysql2 supportBrian Lopez2010-08-021-0/+34
|
* Use better assertion methods for testingNeeraj Singh2010-05-191-3/+3
| | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Add tests for postgresql column type mapping updates [#4270 state:resolved]Ernie Miller2010-03-311-0/+17
| | | | Signed-off-by: Emilio Tagua <miloops@gmail.com>
* AR should respect default values for MySQL BINARY and VARBINARY columns.Jatinder Singh2009-08-091-0/+34
| | | | | | [#1273 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Don't set "NULL" as a constraint on nullable columns [#398 state:resolved]Tarmo Tänav2008-08-231-4/+4
| | | | This is already the default and adding it breaks SQL standards compatibility.
* Fixed that create database statements would always include "DEFAULT NULL" ↵David Heinemeier Hansson2008-07-141-0/+36
(Nick Sieger) [#334 status:committed]