- 24 4月, 2016 6 次提交
-
-
由 Vipul A M 提交于
[ci skip]
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
`IPAddr` is used in `OID::Cidr`.
-
由 Ryuta Kamizono 提交于
Follow up to #23458. Active Record supports MySQL >= 5.0 now.
-
由 Ryuta Kamizono 提交于
Follow up to #24685. `insert_versions_sql` is not public API.
-
由 Vipul A M 提交于
Make sure we handle explicitly passed nil's to lock_version as well. An explicitly passed nil value is now converted to 0 on LockingType, so that we don't end up with ActiveRecord::StaleObjectError in update record optimistic locking Fixes #24695
-
- 23 4月, 2016 3 次提交
-
-
由 Jeremy Daer 提交于
Re. 6e098284
-
https://github.com/rails/rails/commit/42dd2336b31a8d98776d039a2b9fd7f834156a78由 Vipul A M 提交于
https://github.com/rails/rails/commit/42dd2336b31a8d98776d039a2b9fd7f834156a78 changed INSERT INTO versions to run in 1 single query. This breaks for sqlite versions < 3.7.11, which is especially the case on Ubuntu 12.04 LTS, that has SQLite version 3.7.9 as default. So we check for support for multi insert, before performing single query inserts, else fallback to older version of running multiple queries. [Vipul A M & Yasuo Honda]
-
由 Sean Griffin 提交于
When the query cache completes, if Active Record is still inside of a transaction, it is because the transaction is meant to be left open above this unit of work (such as transactional fixtures in tests). There were several tests around the behavior of "tests" that were invalid, as tests are not run through the executor. They have been changed to reflect the new behavior, which is closer to what actually occurs in Rails tests. Fixes #23989 Fixes #24491 Close #24500
-
- 21 4月, 2016 4 次提交
-
-
由 Mark 提交于
-
由 प्रथमेश Sonpatki 提交于
-
由 yuuji.yaginuma 提交于
Follow up to #24221.
-
由 Ryuta Kamizono 提交于
-
- 20 4月, 2016 5 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
If the adapter supports indexes in create table, it generates SQL in one query.
-
由 Ryuta Kamizono 提交于
Follow up to 1683410c.
-
由 Jeremy Daer 提交于
-
由 Ryuta Kamizono 提交于
`Arel::Visitors::VISITORS` was removed at https://github.com/rails/arel/pull/412.
-
- 19 4月, 2016 3 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Jeremy Daer 提交于
* Switch to keyword args where we can without breaking compat. * Use add_table_options! for :options, too. * Some code polish.
-
由 Vipul A M 提交于
Don't create new arrays when trying to compute non_empty_predicates for where clause predicate. Get a 3-4% improvement in AST generation. Perf compare: https://gist.github.com/vipulnsward/7e4e9ecb157e574002313249a7969c82
-
- 18 4月, 2016 2 次提交
-
-
由 Tomasz Stachewicz 提交于
[ci skip] Update ActiveRecord associations documentation to avoid confusion with :validate option. Caused by #24532.
-
由 bogdanvlviv 提交于
-
- 17 4月, 2016 1 次提交
-
-
由 Alex Handley 提交于
- Add link for finding the addional options for index. - Add example for unique index as this is a common requirement. - Add link in guide for index options.
-
- 16 4月, 2016 2 次提交
-
-
由 Yasuo Honda 提交于
-
由 Andrey Novikov 提交于
Comments are specified in migrations, stored in database itself (in its schema), and dumped into db/schema.rb file. This allows to generate good documentation and explain columns and tables' purpose to everyone from new developers to database administrators. For PostgreSQL and MySQL only. SQLite does not support comments at the moment. See docs for PostgreSQL: http://www.postgresql.org/docs/current/static/sql-comment.html See docs for MySQL: http://dev.mysql.com/doc/refman/5.7/en/create-table.html
-
- 15 4月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up to #24542. In MySQL and PostgreSQL, a time column value is saved as ignored the date part of it. But in SQLite3, a time column value is saved as a string. We should keep previous quoting behavior in sqlite3 adapter. ``` sqlite> CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start" time(0), "finish" time(4)); sqlite> INSERT INTO "foos" ("start", "finish") VALUES ('2000-01-01 12:30:00', '2000-01-01 12:30:00.999900'); sqlite> SELECT "foos".* FROM "foos"; 1|2000-01-01 12:30:00|2000-01-01 12:30:00.999900 sqlite> SELECT "foos".* FROM "foos" WHERE "foos"."start" = '2000-01-01 12:30:00' LIMIT 1; 1|2000-01-01 12:30:00|2000-01-01 12:30:00.999900 sqlite> SELECT "foos".* FROM "foos" WHERE "foos"."start" = '12:30:00' LIMIT 1; sqlite> ```
-
- 14 4月, 2016 3 次提交
-
-
由 Ryuta Kamizono 提交于
Context #24522. TIME column on MariaDB doesn't ignore the date part of the string when it coerces to time. ``` root@localhost [test] > CREATE TABLE `foos` (`id` int AUTO_INCREMENT PRIMARY KEY, `start` time(0), `finish` time(4)) ENGINE=InnoDB; Query OK, 0 rows affected (0.02 sec) root@localhost [test] > INSERT INTO `foos` (`start`, `finish`) VALUES ('2000-01-01 12:30:00', '2000-01-01 12:30:00.999900'); Query OK, 1 row affected, 2 warnings (0.00 sec) Note (Code 1265): Data truncated for column 'start' at row 1 Note (Code 1265): Data truncated for column 'finish' at row 1 root@localhost [test] > SELECT `foos`.* FROM `foos`; +----+----------+---------------+ | id | start | finish | +----+----------+---------------+ | 1 | 12:30:00 | 12:30:00.9999 | +----+----------+---------------+ 1 row in set (0.00 sec) root@localhost [test] > SELECT `foos`.* FROM `foos` WHERE `foos`.`start` = '2000-01-01 12:30:00' LIMIT 1; Empty set (0.00 sec) root@localhost [test] > SELECT `foos`.* FROM `foos` WHERE `foos`.`start` = '12:30:00' LIMIT 1; +----+----------+---------------+ | id | start | finish | +----+----------+---------------+ | 1 | 12:30:00 | 12:30:00.9999 | +----+----------+---------------+ 1 row in set (0.00 sec) ```
-
由 Vipul A M 提交于
- Specify we want to run on latest stable ruby for mariadb - change in runs of builds Make mariadb? method publicly available
-
由 Sean Griffin 提交于
Previously we were assuming that the only valid types for encoding were arrays and hashes. However, any JSON primitive is an accepted value by both PG and MySQL. This does involve a minor breaking change in the handling of `default` in the schema dumper. This is easily worked around, as passing a hash/array literal would have worked fine in previous versions of Rails. However, because of this, I will not be backporting this to 4.2 or earlier. Fixes #24234
-
- 13 4月, 2016 2 次提交
-
-
由 Vipul A M 提交于
Reason: - Its not publicly used method. - Exposing it makes an assumption that other adapters support it based on its usage - ActiveRecord::Base.connection.version [ci skip]
-
由 Sean Griffin 提交于
In 04ac5655 I assumed that we would never want to pass the "table_name.column_name" form to where with a symbol. However, in Ruby 2.2 and later, you can quote symbols using the new hash syntax, so it's a semi-reasonable thing to do if we want to support the dot notation (which I'd rather deprecate, but that would be too painful of a migration). Instead we've changed the definition of "this is a table name with a dot" to when the value associated is a hash. It would make very little sense to write `where("table_name.column_name": { foo: :bar })` in any scenario (other than equality for a JSON column which we don't support through `where` in this way). Close #24514.
-
- 12 4月, 2016 1 次提交
-
-
由 Vipul A M 提交于
- we are ending sentences properly - fixing of space issues - fixed continuity issues in some sentences. Reverts https://github.com/rails/rails/commit/8fc97d198ef31c1d7a4b9b849b96fc08a667fb02 . This change reverts making sure we add '.' at end of deprecation sentences. This is to keep sentences within Rails itself consistent and with a '.' at the end.
-
- 11 4月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
Rake includes (an extended version of) FileUtils in tasks. It is more idiomatic that they use this provided interface.
-
- 10 4月, 2016 2 次提交
-
-
由 Prathamesh Sonpatki 提交于
-
由 Prathamesh Sonpatki 提交于
- Check for protected environments while running `db:structure:load` similar to how `db:schema:load` behaves. - Followup of https://github.com/rails/rails/pull/24399.
-
- 09 4月, 2016 1 次提交
-
-
由 Jeremy Daer 提交于
We support microsecond datetime precision for MySQL 5.6.4+. MariaDB has supported it since 5.3.0, but even 10.x versions return a compatible version string like `5.5.5-10.1.8-MariaDB-log` which we parse as 5.5.5, before MySQL supported microsecond precision. Specialize our version check to account for MariaDB to fix.
-
- 06 4月, 2016 3 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ladislav Smola 提交于
* Fix undefined method `owners' for NullPreloader:Class Fixing undefined method `owners' for ActiveRecord::Associations::Preloader::NullPreloader:Class * Use Ruby 1.9 hash format Use Ruby 1.9 hash format #24192 [Rafael Mendonça França + Ladislav Smola]
-
由 Harsimran Singh Maan 提交于
The hard-coded back-ticks made it hard to use a different char for quoting db fields. This checkin replaces it with quote_table_name.
-