| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Add a transaction manager per connection, so it can controls the
connection responsibilities.
Delegate transaction methods to transaction_manager
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The finishing variable on the transaction object was a work-around for
the savepoint name, so after a rollback/commit the savepoint could be
released with the previous name.
related:
9296e6939bcc786149a07dac334267c4035b623a
60c88e64e26682a954f7c8cd6669d409ffffcc8b
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
[ci skip]
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
remove empty unused method
|
| | |_|_|_|_|_|/
| |/| | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Extract iterator method in AR::SchemaDumper
|
| |/ / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Gems which wish to tie into ActiveRecord::SchemaDumper need to
duplicate this logic currently. [Foreigner] is one such example, as is a
library I'm currently working on but which hasn't been released yet:
def tables_with_foreign_keys(stream)
tables_without_foreign_keys(stream)
@connection.tables.sort.each do |table|
next if ['schema_migrations', ignore_tables].flatten.any? do |ignored|
case ignored
when String; table == ignored
when Regexp; table =~ ignored
else
raise StandardError, 'ActiveRecord::SchemaDumper.ignore_tables accepts an array of String and / or Regexp values.'
end
end
foreign_keys(table, stream)
end
end
[Foreigner]: https://github.com/matthuhiggins/foreigner/blob/master/lib/foreigner/schema_dumper.rb#L36-L43
Extract the skip logic to a method, making it much simpler to follow
this same behavior in gems that are tying into the migration flow and
let them dump only tables that aren't skipped without copying this block
of code. The above code could then be simplified to:
def tables_with_foreign_keys(stream)
tables_without_foreign_keys(stream)
@connection.tables.sort.each do |table|
foreign_keys(table, stream) unless ignored?(table)
end
end
It also, in my opinion, simplifies the logic on ActiveRecord's side, and
clarifies the intent of the skip logic.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
No verbose backtrace by db:drop when database does not exist.
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
make `adapter_test` run order independently.
|
| | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
Fix example code of EachValidator [ci skip]
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We have to specify the `:title` option to really use the
`TitleValidator` defined above.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
eileencodes/fix-documentation-that-mentions-macro-instance-var
Fix documentation for `@macro` and reflection types
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Since `@macro` doesn't exist anymore and these reflections are no
longer AssociationReflections but their own types of reflections
based on macro I updated the documentation to match the changes I
made in #16089 and #16198. An `AssociationReflection` that had a
`@macro` of `:has_many` now is a `HasManyReflection`
|
|\| | | | | | | |
| |_|_|_|_|/ / /
|/| | | | | | | |
Fix protect_from_forgery docs [ci-skip]
|
|/ / / / / / / |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
tracker, but only half-ways. You can add that layout option on the same render call, and both templates should be added to the dependency tree. But thats going to require a more serious rework of the tracker. Please do help fix this part of it too. For now, render layout needs to be on its own line.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
[ci skip] Fix documentation of SQLite3Adapter.columns where SQLite3Column was removed in e781aa31fc52a7c696115302ef4d4e02bfd1533b
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | | |
As of https://github.com/rails/rails/commit/e781aa31fc52a7c696115302ef4d4e02bfd1533b SQLite3Column has been dropped.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add password:digest information to scaffold generator help text
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
help [ci skip]
|
| | |/ / / / /
| |/| | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[ci skip]
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
adding indexes on tables in migration scripts [ci skip]
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
missed one migration script in last commit
remove some empty lines
using the belongs_to index option to be more concise
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Add support for Postgresql JSONB
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | | |
[Philippe Creux, Chris Teague]
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | | |
tgxworld/fix_template_assertion_when_opening_a_session
Fix template assertion when opening a session.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
See https://github.com/rails/rails/pull/16234#commitcomment-7115670.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Make HWIA copy the default proc too.
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | | |
[fixes #16279]
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixes the following issue:
1) Failure:
ActiveRecord::MySQLPurgeTest#test_establishes_connection_to_test_database [test/cases/tasks/mysql_rake_test.rb:200]:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: ActiveRecord::Base.establish_connection(:test)
satisfied expectations:
- allowed any number of times, invoked once: #<Mock:0x2349430>.recreate_database(any_parameters)
- allowed any number of times, invoked once: ActiveRecord::Base.establish_connection(any_parameters)
- allowed any number of times, invoked once: ActiveRecord::Base.connection(any_parameters)
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Previously this method always established a connection to the test database.
This resulted in buggy behavior when combined with other tasks like
`bin/rake db:schema:load`.
This was one of the reasons why #15394 (22e9a91189af2c4e6217a888e77f22a23d3247d1)
was reverted:
> I’ve replicated it on a new app by the following commands: 1) rails
generate model post:title, 2) rake db:migrate, 3) rake
db:schema:load, 4) rails runner ‘puts Post.first’. The last command
goes boom. Problem is that rake db:schema:load wipes the database,
and then doesn’t actually restore it. This is all on MySQL. There’s
no problem with SQLite.
-- DHH
https://github.com/rails/rails/commit/22e9a91189af2c4e6217a888e77f22a23d3247d1#commitcomment-6834245
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | |_|/ / / / /
| |/| | | | | | |
Fixes #16265 and correct documentation typo
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Closes #16261.
[Matthew Draper, Yves Senn]
Using `DEFAULT NULL` results in the same behavior as `DROP DEFAULT`.
However, PostgreSQL will cast the default to the columns type,
which leaves us with a default like "default NULL::character varying".
/cc @matthewd
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
[ci skip]Add i18n master to the Gemfile
|
| |/ / / / / / |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Calling require_self twice in css raises Sprockets::ArgumentError exception [ci skip]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[ci skip]
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|