aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters
Commit message (Collapse)AuthorAgeFilesLines
* Standardize the use of current_adapter?Rafael Mendonça França2013-01-011-1/+1
|
* add missing require and fixturesAaron Patterson2012-12-291-0/+3
|
* fix time typcasting on group counts in PGAaron Patterson2012-12-281-0/+6
|
* Wrap table creation in a transaction.Rafael Mendonça França2012-12-211-6/+8
| | | | This will make the tests pass when the intrange datatype is not present
* AR supporting new int4range and int8range data type on PostgreSQL >= 9.2. ↵Alexey2012-12-171-1/+18
| | | | Fix realization
* AR supporting new intrange data type on PostgreSQL >= 9.2Alexey2012-12-161-0/+87
|
* Session variables for mysql, mysql2, and postgresql adapters can be setAaron Stone2012-12-083-0/+75
| | | | | | | | | in the new 'variables:' hash in each database config section in database.yml. The key-value pairs of this hash will be sent in a 'SET key = value, ...' query on new database connections. The configure_connection methods from mysql and mysql2 into are consolidated into the abstract_mysql base class.
* Merge pull request #6245 from bogdan/bc_timestampRafael Mendonça França2012-11-211-0/+9
|\ | | | | Postgresql adapter: fix handling of BC timestamps
| * Fix postgresql adapter to handle bc timestamps correctlyBogdan Gusiev2012-11-211-0/+9
| |
* | Refactoring, testing and documenting pg_connection.distinctSemyon Perepelitsa2012-11-211-0/+29
|/
* Postgresql doesn't accepts limits on text columns.Victor Costan2012-11-201-0/+18
|
* Remove not assigned variable warning from sqlite3 adapter testCarlos Antonio da Silva2012-10-291-1/+1
|
* SQLite3Adapter#type_cast should not mutate argumentsStefan Rusterholz2012-10-281-0/+6
|
* refactor `SQLite3Adapter#copy_table` to prevent primary key redefinitions. #6378Yves Senn2012-10-281-1/+8
|
* Use the MySQL varbinary type when appropriate in migrations.Victor Costan2012-10-272-0/+28
|
* Remove ActiveRecord::ModelJon Leighton2012-10-262-17/+17
| | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
* Fix typo in inet and cidr savingMiguel Herranz2012-10-141-0/+13
|
* #7914 get default value when type uses schema nameArturo Pie2012-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | PostgreSQL adapter properly parses default values when using multiple schemas and domains. When using domains across schemas, PostgresSQL prefixes the type of the default value with the name of the schema where that type (or domain) is. For example, this query: ``` SELECT a.attname, d.adsrc FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = "defaults"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum; ``` could return something like "'<default_value>'::pg_catalog.text" or "(''<default_value>'::pg_catalog.text)::text" for the text columns with defaults. I modified the regexp used to parse this value so that it ignores anything between ':: and \b(?:character varying|bpchar|text), and it allows to have optional parens like in the above second example.
* Cleanup trailing whitespacesdfens2012-10-122-2/+2
|
* Rename "Fixtures" class to "FixtureSet"Alexey Muranov2012-10-072-4/+4
| | | | Rename `ActiveRecord::Fixtures` class to `ActiveRecord::FixtureSet`. Instances of this class normally hold a collection of fixtures (records) loaded either from a single YAML file, or from a file and a folder with the same name. This change make the class name singular and makes the class easier to distinguish from the modules like `ActiveRecord::TestFixtures`, which operates on multiple fixture sets, or `DelegatingFixtures`, `::Fixtures`, etc., and from the class `ActiveRecord::Fixture`, which corresponds to a single fixture.
* PostgreSQL, quote table names when fetching the primary key. Closes #5920Yves Senn2012-10-051-0/+4
|
* Moves column dump specific code to a module included in AbstractAdapterDan McClain2012-09-142-6/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having column related schema dumper code in the AbstractAdapter. The code remains the same, but by placing it in the AbstractAdapter, we can then overwrite it with Adapter specific methods that will help with Adapter specific data types. The goal of moving this code here is to create a new migration key for PostgreSQL's array type. Since any datatype can be an array, the goal is to have ':array => true' as a migration option, turning the datatype into an array. I've implemented this in postgres_ext, the syntax is shown here: https://github.com/dockyard/postgres_ext#arrays Adds array migration support Adds array_test.rb outlining the test cases for array data type Adds pg_array_parser to Gemfile for testing Adds pg_array_parser to postgresql_adapter (unused in this commit) Adds schema dump support for arrays Adds postgres array type casting support Updates changelog, adds note for inet and cidr support, which I forgot to add before Removing debugger, Adds pg_array_parser to JRuby platform Removes pg_array_parser requirement, creates ArrayParser module used by PostgreSQLAdapter
* postgres, map scaled intervals to string datatype (#7518)Yves Senn2012-09-061-1/+3
|
* Put the create_table block in a transaction.Rafael Mendonça França2012-09-051-2/+4
| | | | | This will solve the issue that abort the connection transaction when we skip the tests.
* ActiveRecord support to PostgreSQL 9.2 JSON typeDickson S. Guedes2012-09-051-0/+69
| | | | | | | | | This implements the support to encode/decode JSON data to/from database and creating columns of type JSON using a native type [1] supported by PostgreSQL from version 9.2. [1] http://www.postgresql.org/docs/9.2/static/datatype-json.html
* Modularize postgresql adapterKonstantin Shabanov2012-09-051-3/+0
|
* Rename to test_mysql_strict_mode_disabled_dont_override_global_sql_modeYasuo Honda2012-08-222-6/+8
| | | | | | | | | Reason since MySQL 5.6.6-m9 the `sql_mode` default value is `NO_ENGINE_SUBSTITUTION`. This default parameter change is out of control from Rails. This test verifies Rails not overriding the default `@@GLOBAL.sql_mode` value by checking if `@@GLOBAL.sql_mode` is the same as `@@SESSION.sql_mode`.
* Fix only-once stub logic.Steve Jorgensen2012-08-081-1/+1
| | | | | Didn't fail the test because adapter#query happens to not call raw connection's #query, but don't want to count on that and have a fragile test.
* Fix just-plain-wrongness of psql auto-reconnect test.Steve Jorgensen2012-08-071-8/+9
| | | | | | Full test requiring manual intervention was fine, but w/ simulated disconnect, assertion was backward & still passing. Was several kinds of wrong.
* Deprecate ActiveRecord::Base.scoped.Jon Leighton2012-07-272-2/+2
| | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders.
* ActiveRecord::Base.all returns a Relation.Jon Leighton2012-07-272-2/+2
| | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
* Stop being silly with formatting of method aliasing.Steve Jorgensen2012-07-161-3/+3
|
* Simulated & actual (manual/skipped) PostgreSQL auto-reconnection tests.Steve Jorgensen2012-07-161-0/+72
|
* fixing tests to deal with data differences between prepared statements and ↵Aaron Patterson2012-07-132-2/+7
| | | | | | | non-prepared statements Conflicts: activerecord/test/cases/query_cache_test.rb
* Unify the collation API for the database adptersRafael Mendonça França2012-07-012-4/+4
|
* Support collate and ctype on the PostgreSQL.kennyj2012-06-292-0/+12
|
* fix: limit of enum columns of mysqlYamada Masaki2012-06-282-0/+20
|
* Revert "Merge pull request #6344"Piotr Sarnacki2012-06-251-6/+1
| | | | | | | | | | | | | | This commit needs to be reverted because it introduces difficulties when using sqlite3 in development and other databases in production. This happens because when you create time column in sqlite3, it's dumped as datetime in schema.rb file. This reverts commit 57d534ee9e441d078fcc161c0c78ebaa5aacd736, reversing changes made to 20f049fb50daee0c5e5a69b55b529af5737e8e3f. Conflicts: activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
* Allow precision option for postgresql datetimesTony Schneider2012-06-221-0/+65
| | | | | | | | | | This patch addresses the difficulty of retrieving datetime fields. By default, the database holds a higher precision than the time as a String. This issue is discussed at length at the following links: - [#3519](https://github.com/rails/rails/issues/3519) - [#3520](https://github.com/rails/rails/issues/3520) Also, kudos to @mattscilipoti
* Improve the derivation of HABTM assocation join table namesAndrew White2012-06-222-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the derivation of HABTM join table name to take account of nesting. It now takes the table names of the two models, sorts them lexically and then joins them, stripping any common prefix from the second table name. Some examples: Top level models (Category <=> Product) Old: categories_products New: categories_products Top level models with a global table_name_prefix (Category <=> Product) Old: site_categories_products New: site_categories_products Nested models in a module without a table_name_prefix method (Admin::Category <=> Admin::Product) Old: categories_products New: categories_products Nested models in a module with a table_name_prefix method (Admin::Category <=> Admin::Product) Old: categories_products New: admin_categories_products Nested models in a parent model (Catalog::Category <=> Catalog::Product) Old: categories_products New: catalog_categories_products Nested models in different parent models (Catalog::Category <=> Content::Page) Old: categories_pages New: catalog_categories_content_pages Also as part of this commit the validity checks for HABTM assocations have been moved to ActiveRecord::Reflection One side effect of this is to move when the exceptions are raised from the point of declaration to when the association is built. This is consistant with other association validity checks.
* Change minimum (default) log level in PostgreSQL to warning.kennyj2012-06-181-0/+4
|
* Add uuid type support to PostgreSQL adapterKonstantin Shabanov2012-06-141-0/+15
|
* Fix logs name consistency.kennyj2012-05-193-15/+92
|
* Fix warning: ambiguous first argument.kennyj2012-05-181-1/+1
|
* Merge pull request #6192 from ↵Aaron Patterson2012-05-161-8/+11
|\ | | | | | | | | danmcclain/add_inet_and_cidr_types_to_postgresql_adapter Add support for macaddr, inet, and cidr types to PostgreSQL adapter
| * Removes NetAddr dependencyDan McClain2012-05-081-3/+4
| |
| * Converts inet and cidr columns to NetAddr::CIDRDan Seaver2012-05-071-4/+6
| |
| * Adds migration and schema dump support for INET, CIDR, and MACADDRDan Seaver2012-05-051-3/+3
| |
* | Remove unneeded testsPiotr Sarnacki2012-05-161-12/+0
| |
* | SQLite3 doesn't actually support the 'time' type.Erich Menge2012-05-151-0/+5
| |