| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
`schema_creation` is not public API.
https://github.com/rails/rails/blob/v5.0.0.beta4/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L121
https://github.com/rails/rails/blob/v5.0.0.beta4/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L78
|
|
|
|
|
|
| |
Refactor of #22911.
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|
|
|
|
|
|
|
|
| |
- Rename max to statement_limit
- Remove magic number 1000 from everywhere
- Defined StatementPool::DEFAULT_STATEMENT_LIMIT and started using it everywhere
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|
|
|
|
|
| |
Adapters override `#supports_savepoints?` to return `true` if they
support transaction savepoints. Defaults to `false`.
|
|\
| |
| |
| | |
Add prepared statements support for `Mysql2Adapter`
|
|/ |
|
|
|
|
| |
`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}`.
|