| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
`Arel::Visitors::VISITORS` was removed at https://github.com/rails/arel/pull/412.
|
|\
| |
| |
| | |
Extract `extract_schema_qualified_name` method
|
| | |
|
|\ \
| | |
| | |
| | | |
Extract `arel_visitor` and move up to the abstract adapter
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Add `ActiveRecord::ValueTooLong` exception class
|
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Switch to keyword args where we can without breaking compat.
* Use add_table_options! for :options, too.
* Some code polish.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| | | |
| | | | |
Test against MariaDB 10.0
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Specify we want to run on latest stable ruby for mariadb
- change in runs of builds
Make mariadb? method publicly available
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
Simply use `select_value` in `show_variable`
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`SELECT @@name` statement returns only single row or `StatementInvalid`.
```
root@localhost [activerecord_unittest] > SELECT @@version;
+-----------+
| @@version |
+-----------+
| 5.7.9-log |
+-----------+
1 row in set (0.00 sec)
root@localhost [activerecord_unittest] > SELECT @@unknown_variable;
ERROR 1193 (HY000): Unknown system variable 'missing_variable'
```
|
|\ \ \ \
| | | | |
| | | | | |
Move quoting methods to `Quoting` module
|
| | | | |
| | | | |
| | | | |
| | | | | |
`MysqlString`
|
| | | | |
| | | | |
| | | | |
| | | | | |
methods to `Quoting` module
|
| | | | | |
|
|/ / / /
| | | |
| | | | |
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.
|
| |_|/
|/| |
| | |
| | |
| | |
| | | |
Because we define `QUOTED_TRUE` as `"1"` and `QUOTED_FALSE` as `"0"`.
And add test cases to ensure this commit does not break current
behavior even if the value of `attributes_before_type_cast` is false.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Make to private the visibility of `_quote` and `_type_cast`
|
| | | | |
|
|/ / / |
|
| | |
| | |
| | |
| | | |
For keep the default SQL mode.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
kamipo/case_sensitive_comparison_for_non_string_column
The BINARY Operator is only needed for string columns
|
| |/ /
| | |
| | |
| | | |
Follow up to #13040.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
working
Currently the results of `column.serial?` is not correct. For
`column.serial?` correctly working, initialize `column.table_name`
immediately.
|
|/ / |
|
|/
|
|
| |
Simply it is sufficient to override `can_perform_case_insensitive_comparison_for?`.
|
|
|
|
|
| |
Currently some features uses `information_schema` (e.g. foreign key
support). `information_schema` introduced since MySQL 5.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`initialize_schema_migrations_table` is called in every migrations.
https://github.com/rails/rails/blob/v5.0.0.beta1/activerecord/lib/active_record/migration.rb#L1080
https://github.com/rails/rails/blob/v5.0.0.beta1/activerecord/lib/active_record/schema.rb#L51
This means that extra `show variables` is called regardless of the
existence of `schema_migrations` table.
This change is to avoid extra `show variables` if `schema_migrations`
table exists.
|
| |
|
|
|
|
|
| |
`LOST_CONNECTION_ERROR_MESSAGES` was added by f384582.
But currently unused from anywhere.
|
|
|
|
|
|
|
| |
Integer limit as a byte size was introduced from Rails 2.1.
`limit: 11` is not a byte size, but take care for backward-compatibility
with Rails 2.0 (a892af6). Integer limit out of range should be allowed
to raise by #6349. I think we should remove this backward-compatibility.
|
| |
|
|
|
|
| |
`connection_adapters/mysql/type_metadata.rb`
|
| |
|
|\
| |
| | |
Prevent destructive action on production database
|
| | |
|
| |
| |
| |
| | |
Simply `{update|delete}_sql` aliases to `{update|delete}`.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before:
```
SELECT 1 AS one FROM "topics" WHERE "topics"."title" = 'abc' LIMIT $1 [["LIMIT", 1]]
```
After:
```
SELECT 1 AS one FROM "topics" WHERE "topics"."title" = $1 LIMIT $2 [["title", "abc"], ["LIMIT", 1]]
```
|
|\ \
| | |
| | | |
Add `columns_for_distinct` for MySQL 5.7 with ONLY_FULL_GROUP_BY
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In MySQL 5.7.5 and up, ONLY_FULL_GROUP_BY affects handling of queries
that use DISTINCT and ORDER BY. It requires the ORDER BY columns in the
select list for distinct queries, and requires that the ORDER BY include
the distinct column.
See https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html
|
| | |
| | |
| | |
| | | |
Follow up to #19359 and avoid #22241.
|
|\ \ \
| | | |
| | | | |
Correctly cache create_table_info
|
| | |/
| |/|
| | |
| | | |
Follow up to #21664.
|