- 10 3月, 2017 1 次提交
-
-
由 mylake 提交于
Use “distinct” to filter redundant types from pg_typeto reduce memory bloat especially in multi-schema structure database
-
- 27 2月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
Actually `index_name_length` depend on `max_identifier_length`, not always 63.
-
由 Ryuta Kamizono 提交于
`supports_migrations?` was added at 4160b518 to determine if schema statements (`create_table`, `drop_table`, etc) are implemented in the adapter. But all tested databases has been supported migrations since a4fc93c3 at least.
-
- 26 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
`valid_type?` should return true if a type exists in `native_database_types` at least. https://github.com/rails/rails/blob/v5.1.0.beta1/activerecord/lib/active_record/schema_dumper.rb#L136
-
- 21 2月, 2017 1 次提交
-
-
由 eileencodes 提交于
This ensures multiple threads inside a transactional test to see consistent database state. When a system test starts Puma spins up one thread and Capybara spins up another thread. Because of this when tests are run the database cannot see what was inserted into the database on teardown. This is because there are two threads using two different connections. This change uses the statement cache to lock the threads to using a single connection ID instead of each not being able to see each other. This code only runs in the fixture setup and teardown so it does not affect real production databases. When a transaction is opened we set `lock_thread` to `Thread.current` so we can keep track of which connection the thread is using. When we rollback the transaction we unlock the thread and then there will be no left-over data in the database because the transaction will roll back the correct connections. [ Eileen M. Uchitelle, Matthew Draper ]
-
- 14 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Add `default_index_type?` to the generic schema dumper doesn't have the knowledge about an index type
-
- 13 2月, 2017 3 次提交
-
-
由 Ryuta Kamizono 提交于
Closes #27980
-
由 Ryuta Kamizono 提交于
Closes #27979
-
由 Ryuta Kamizono 提交于
`supports_primary_key?` was added to determine if `primary_key` is implemented in the adapter in f0602214. But we already use `primary_key` without `supports_primary_key?` (207f266c, 5f3cf424) and using `supports_primary_key?` has been removed in #1318. This means that `supports_primary_key?` is no longer used in the internal and Active Record doesn't work without `primary_key` is implemented (all adapters must implement `primary_key`). Closes #27977
-
- 09 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Column options are passed as an hash args then used as `options` hash in `add_column_options!`. Converting args to attributes is inconvinient for using options as an hash.
-
- 31 1月, 2017 1 次提交
-
-
由 Jordan Lewis 提交于
column_definitions() needs to fetch the collation for every column, if present. Previously, it did so using a correlated subquery - a subquery that references results from the outer scope. This patch updates the query to remove the subquery in favor of a simpler and more efficient JOIN clause. Running the two queries through EXPLAIN against Postgres additionally shows that the original form with a correlated subquery requires a Nested Loop Left Join, while the new form with a simple JOIN can use a more efficient Merge Left Join.
-
- 22 1月, 2017 1 次提交
-
-
由 Benoit Tigeot 提交于
One empty string allocation per column per row.
-
- 04 1月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
Revert "Merge pull request #21233 from mtsmfm/disable-referential-integrity-without-superuser-privileges" This reverts commit eeac6151, reversing changes made to 5c40239d. Reason: Broke the isolated tests. https://travis-ci.org/rails/rails/builds/188721346
-
- 29 12月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Some methods were added to public API in 5b14129d and they should be not part of the public API.
-
- 24 12月, 2016 2 次提交
-
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
- 06 12月, 2016 3 次提交
-
-
由 Ryuta Kamizono 提交于
Raise `ActiveRecord::RangeError` when values that executed are out of range.
-
由 Ryuta Kamizono 提交于
Raise `ActiveRecord::NotNullViolation` when a record cannot be inserted or updated because it would violate a not null constraint.
-
由 Jon McCartie 提交于
-
- 03 12月, 2016 1 次提交
-
-
由 Fumiaki MATSUSHIMA 提交于
ref: 72c15572 - We must use `authors` fixture with `author_addresses` because of its foreign key constraint. - Tests require PostgreSQL >= 9.4.2 because it had a bug about `ALTER CONSTRAINTS` and fixed in 9.4.2.
-
- 02 12月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
PG's type map assumes that all Ruby floats are going to a field with an OID of type float4 or float8, and generates text which is invalid syntax for other types. Since the gem can handle floats properly without this encoder (albeit slightly slower), we can continue to use that as we have in prior versions of Rails. Fixes #27246
-
- 23 11月, 2016 1 次提交
-
-
由 Yaw Boakye 提交于
Since 9.4, PostgreSQL recommends using `pgcrypto`'s `gen_random_uuid()` to generate version 4 UUIDs instead of the functions in the `uuid-ossp` extension. These changes uses the appropriate UUID function depending on the underlying PostgreSQL server's version, while maintaining `uuid_generate_v4()` in older migrations.
-
- 28 10月, 2016 1 次提交
-
-
由 Matthew Draper 提交于
A query may wait on a database-level lock, which could lead to a deadlock between threads.
-
- 14 10月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
If does not quote table name properly, invalid SQL is generated.
-
- 14 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
All indentation was normalized by rubocop auto-correct at 80e66cc4. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
-
- 01 9月, 2016 3 次提交
-
-
由 nanaya 提交于
There's no 'text to text' casting in the cast table so the feature detection fails.
-
由 nanaya 提交于
-
由 Sean Griffin 提交于
There are some minor changes to the point type as I had forgotten that this will affect the behavior of `t.point` in migrations and the schema dumper so we need to handle those as well. I'll say this again so I can convince myself to come up with a better structure... TYPES SHOULD NOT CARE ABOUT SCHEMA DUMPING AND WE NEED TO BETTER SEPARATE THESE.
-
- 26 8月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
For reduce instantiating `Type::Value`.
-
- 07 8月, 2016 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 05 8月, 2016 2 次提交
-
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-
- 26 7月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Because `type_cast` against `binds` always requires `attr.value_for_database` and this pattern appears frequently.
-
- 19 7月, 2016 1 次提交
-
- 24 5月, 2016 1 次提交
-
-
由 Erol Fornoles 提交于
-
- 21 5月, 2016 1 次提交
-
-
由 Erol Fornoles 提交于
-
- 30 4月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up of 1683410c. Signed-off-by: NJeremy Daer <jeremydaer@gmail.com>
-
- 25 4月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
Example: create_table :users do |t| t.string :name t.index 'lower(name) varchar_pattern_ops' end Fixes #19090. Fixes #21765. Fixes #21819. Fixes #24359. Signed-off-by: NJeremy Daer <jeremydaer@gmail.com>
-
由 Vipul A M 提交于
- Rename max to statement_limit - Remove magic number 1000 from everywhere - Defined StatementPool::DEFAULT_STATEMENT_LIMIT and started using it everywhere Signed-off-by: NJeremy Daer <jeremydaer@gmail.com>
-