| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
"utf8mb4"
Please, see rationale in the included CHANGELOG patch.
|
|\
| |
| | |
Cast number to string in Postgres
|
| |
| |
| |
| | |
fixes #9170
|
| | |
|
|/ |
|
|
|
|
| |
To make quote escape binary data correctly it needs the column passed in.
|
|
|
|
|
|
|
| |
As of ccc6910c we use `mysqldump` to create the `structure.sql`.
The old `#structure_dump` code is still in AR but never used.
I removed all relevant parts from the code-base.
|
|
|
|
|
|
|
|
|
|
| |
In an AR model a timestamptz attribute would return a ruby string and AR
tests did not check for any type casting. Previous tests would pass
only because an assert_equal was being used on a Time.utc object, which
will parse the right side of the eq to a valid Time instance for
comparision.
switch to test instance of Time instead of ActiveSupport::TimeWithZone
|
| |
|
|
|
|
|
|
|
|
| |
Closes #9480.
We use `TableDefinition` for `#create_table` and `Table` for `#change_table`.
The PostgreSQL sepcifc types were only defined on `TableDefinition` so I
also added them to `Table`.
|
|
|
|
| |
The connection url parssing don't accept the socket option
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit c321b309a9a90bbfa0912832c11b3fef52e71840.
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
Reason: failing test
1) Error:
test_valid_column(ActiveRecord::ConnectionAdapters::SQLite3AdapterTest):
NoMethodError: undefined method `column' for
test/cases/adapters/sqlite3/sqlite3_adapter_test.rb:29:in
`test_valid_column'
|
|\
| |
| | |
schema dumper tests now conducted by ActiveRecord::Base.Connection
|
| | |
|
| | |
|
| |
| |
| |
| | |
dumped extensions if they are unsupported by the database
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Travis only has PostgreSQL 9.1.x but 9.2 is required for range datatypes.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we set encoding latin1 for a PostgreSQL database, it calls
PostgreSQLAdapter::create_database with options that have,
among other things:
{ 'encoding' => 'latin1' }
Then, we use reverse_merge(:encoding => "utf8") to setup the default
encoding. In the end, the hash looks like:
{ :encoding => 'utf8', 'encoding' => 'latin1' }
The call to options.symbolize_keys calls to_sym on each_key of this
Hash. It usually means that the encoding passed overwrites the default
utf8, but it's not guaranteed. So, we shouldn't rely on it.
The same was happening in ActiveRecord::ConnectionHandling.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This will make the tests pass when the intrange datatype is not present
|
|
|
|
| |
Fix realization
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Postgresql adapter: fix handling of BC timestamps
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|