| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
| | |
| | |
| | |
| | | |
Fixes: https://github.com/rails/rails/issues/17856.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Refactor `add_column_options!`, to move the quoting of default value for :uuid in `quote_value`.
|
| | | | |
|
| |/ /
| | |
| | |
| | | |
:uuid in `quote_value`.
|
|/ / |
|
| |
| |
| |
| |
| | |
Not sure how we missed this case when we moved everything else to the
`_quote` method.
|
| |
| |
| |
| |
| |
| |
| | |
This allows us so abstract the migration from the type that is actually
used by Rails. For example, ":string" may be a varchar or something,
but the framework does that translation, and the app shouldn't need to
know.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some comments that are meant to separate blocks of code in a file show up
on http://api.rubyonrails.org as though they were part of the documentation.
This commit hides those comments from the documentation.
Stems from the discussion with @zzak at https://github.com/voloko/sdoc/issues/79#issuecomment-64158738
[ci skip]
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also checked to make sure this does not affect foreign key constraints.
(It doesn't).
Fixes #12856
Closes #14088
|
| |
| |
| |
| | |
We can't change the signature without a deprecation cycle.
|
|\ \
| | |
| | | |
Wrap code snippets in +, not backticks, in sdoc [ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I grepped the source code for code snippets wrapped in backticks in the comments
and replaced the backticks with plus signs so they are correctly displayed in
the Rails documentation.
[ci skip]
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the following changes:
* warn if `:null` is not passed to `add_timestamps`
* `timestamps` method docs link to `add_timestamps` docs
* explain where additional options go
* adjust examples to include `null: false` (to prevent deprecation warnings)
|
| |
| |
| |
| | |
This reverts commit da99a2a2982d35f670ad9647463e09bfe9032b70.
|
| | |
|
| |
| |
| |
| | |
Oh hey, we got to remove some code because of that!
|
| |
| |
| |
| |
| |
| | |
Arel handles this for us automatically. Updated tests, as BindParam is
no longer a subclass of SqlLiteral. We should remove the second argument
to substitute_at entirely, as it's no longer used
|
| |
| |
| |
| |
| |
| | |
This caused a pretty major performance regression for 4.2, as this is a
hotspot for query construction. We're still slightly slower than 4.1,
but it's much less significant.
|
| | |
|
| |
| |
| |
| |
| | |
also increase the version of pg required so that people will get the
GVL friendly version
|
|\ \
| | |
| | |
| | | |
add a Table#name accessor like TableDefinition#name
|
| | | |
|
|\ \ \
| |/ /
|/| | |
remove never called method `limited_update_conditions`
|
| | | |
|
|/ /
| |
| |
| |
| | |
- remove unused method `supports_add_column?`
- change additional restriction method to `valid_alter_table_type?`
- fix code style
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why are people assigning booleans to string columns? >_>
We unintentionally changed the behavior on Sqlite3 and PostgreSQL.
Boolean values should cast to the database's representation of true and
false. This is 't' and 'f' by default, and "1" and "0" on Mysql. The
implementation to make the connection adapter specific behavior is hacky
at best, and should be re-visted once we decide how we actually want to
separate the concerns related to things that should change based on the
database adapter.
That said, this isn't something I'd expect to change based on my
database adapter. We're storing a string, so the way the database
represents a boolean should be irrelevant. It also seems strange for us
to give booleans special behavior at all in string columns. Why is
`to_s` not sufficient? It's inconsistent and confusing. Perhaps we
should consider deprecating in the future.
Fixes #17571
|
| | |
|
|\ \
| | |
| | | |
Remove unused duplicated method `add_column_position` from AbstractMysqlAdapter.
|
| | |
| | |
| | |
| | | |
AbstractMysqlAdapter
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
MySQL reports the column name as `"MAX(developer_id)"`. PG will report
it as `"max"`
|
|\ \ \
| |/ /
|/| | |
Remove redundant substitute index when constructing bind values
|
| | |
| | |
| | |
| | |
| | |
| | | |
We end up re-ordering them either way when we construct the Arel AST (in order
to deal with rewhere, etc), so we shouldn't bother giving it a number in the
first place beforehand.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
Skip setting sequence on a table create if the value is 0 since it will start the first value at 1 anyway.
This fixes the PG error 'setval: value 0 is out of bounds for sequence vms_id_seq...' encountered when migrating a new DB.
BugzID: 15452,9772,13475,16850
|
| | |
|
|\ \
| | |
| | | |
Remove redundant `to_s` in interpolation
|
| | | |
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | | |
mcfiredrill/doc-change-column-default-abstract-mysql-adapter
document change_column and change_column_default for abstract_mysql_adapter [ci skip]
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The MySQLAdapter type map used the lowest priority for enum types.
This was the result of a recent refactoring and lead to some broken lookups
for enums with values that match other types. Like `8bit`.
This patch restores the priority to what we had before the refactoring.
/cc @sgrif
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch uniformizes warning messages. I used the most common style
already present in the code base:
* Capitalize the first word.
* End the message with a full stop.
* "Rails 5" instead of "Rails 5.0".
* Backticks for method names and inline code.
Also, converted a few long strings into the new heredoc convention.
|