Xavier Noria
b454601be4
revises EXPLAIN tests for SQLite3
...
The output in Travis is a bit different. The SQLite
documentation (http://www.sqlite.org/eqp.html ) warns
output may change dramatically between releases. I
do not want to mock the result set because I want a
real EXPLAIN to happen. I prefer a test that may fail
in future releases than a test that may give false
positives in future releases.
2011-11-06 22:21:05 -08:00
Aaron Patterson
9b46613780
Merge pull request #3521 from nulogy/fix_postgres_adapter_to_handle_spaces_between_schemas
...
Fix postgres adapter to handle spaces between schemas
2011-11-06 13:16:07 -03:00
Justin Mazzi
c7d2078596
Update ActiveRecord#attribute_present? to work as documented
...
"Returns true if the specified attribute has been set by the user or by
a database load and is neither nil nor empty?"
Fixes #1613
2011-11-05 22:36:19 -04:00
Xavier Noria
e7b7b44123
implements AR::Relation#explain
...
This is a first implementation, EXPLAIN is highly
dependent on the database and I have made some
compromises.
On one hand, the method allows you to run the most
common EXPLAIN and that's it. If you want EXPLAIN
ANALYZE in PostgreSQL you need to do it by hand.
On the other hand, I've tried to construct a string
as close as possible to the ones built by the
respective shells. The rationale is that IMO the
user should feel at home with the output and
recognize it at first sight. Per database.
I don't know whether this implementation is going
to work well. Let's see whether people like it.
2011-11-05 18:30:19 -07:00
Jon Leighton
f575e21025
Merge pull request #3525 from kennyj/fix_3440-1
...
Fixed an issue id false option is ignored on mysql/mysql2 (fix #3440 )
2011-11-05 10:29:18 -07:00
kennyj
fb0bf3c984
Fixed an issue id false option is ignored on mysql/mysql2 ( fix #3440 )
2011-11-06 02:15:47 +09:00
Jon Leighton
9a111c7cf9
Use uniq instead of manually putting a DISTINCT in the query
2011-11-05 16:22:18 +00:00
Jon Leighton
562583c766
Add ActiveRecord::Relation#uniq for toggling DISTINCT in the SQL query
2011-11-05 16:22:18 +00:00
Vlad Jebelev
69dcd45aea
AR changes to support creating ordered (asc, desc) indexes
2011-11-04 15:45:24 -05:00
Arun Agrawal
6da558660c
Fix test as one more has_many added
2011-11-04 19:30:59 +05:30
Franck Verrot
1679aa56f3
Synchronize the gemspecs since CHANGELOG has been renamed to CHANGELOG.md
2011-11-04 14:46:39 +01:00
Jon Leighton
281272ad36
Convert CHANGELOGs to Markdown format.
...
Reasons:
* Markdown reads well as plain text, but can also be formatted.
* It will make it easier for people to read on the web as Github
formats the Markdown nicely.
* It will encourage a level of consistency when people are writing
CHANGELOG entries.
The script used to perform the conversion is at
https://gist.github.com/1339263
2011-11-04 12:55:17 +00:00
Jon Leighton
e6cc2ea201
Allow the :class_name option for associations to take a symbol.
...
This is to avoid confusing newbies, and to be consistent with the fact
that other options like :foreign_key already allow a symbol or a string.
2011-11-04 11:17:56 +00:00
Aaron Patterson
0e407a9041
Merge pull request #1163 from amatsuda/sexier_migration_31
...
Sexier migrations
2011-11-04 03:29:59 -07:00
Jeremy Kemper
533a9f84b0
Merge pull request #3507 from jmazzi/issue-3503
...
Preserve SELECT columns on the COUNT for finder_sql when possible
2011-11-03 21:17:15 -07:00
Jon Leighton
d486103570
Fix #3271 .
...
Building the conditions of a nested through association could
potentially modify the conditions of the through and/or source
association.
This is a Bad Thing.
2011-11-03 15:12:08 +00:00
Jon Leighton
567d454d99
Memoize through association
2011-11-03 13:24:39 +00:00
Jon Leighton
19b2a5f2bd
Remove all revelant through records.
...
If a record is removed from a has_many :through, all of the join records
relating to that record should also be removed from the through
association's target.
(Previously the records were removed in the database, but only one was
removed from the in-memory target array.)
2011-11-03 13:13:13 +00:00
Jon Leighton
71bc921ec8
Fix adding multiple instances of the same record to a has_many :through.
...
Fixes #3425 .
2011-11-03 12:39:05 +00:00
Jon Leighton
b4b178f7e9
Fix #3247 .
...
Fixes creating records in a through association with a polymorphic source
type.
2011-11-03 10:23:42 +00:00
Vijay Dev
1afe269a4a
assert_match takes a regexp and a string in that order
2011-10-31 19:01:03 +05:30
Laust Rud Jacobsen
ff9c2799c1
dump_schema_information: explicitly order inserts into schema_migrations table
...
This change reduces churn in the db/development_structure.sql file when using :sql as
active_record.schema_format, and makes comparing diffs much easier.
Test ensures the output SQL-statements are lexically ordered by version.
2011-10-31 10:36:13 +01:00
Vijay Dev
c809de8291
Merge branch 'master' of github.com:lifo/docrails
2011-10-30 14:47:23 +05:30
Aaron Patterson
4a065d56ed
clear statement cache when tables are altered
2011-10-27 10:55:52 -07:00
Joe Van Dyk
420f7fd507
Added failing test case for changing schema in migration not clearing the prepared statement cache
2011-10-27 10:50:38 -07:00
Arun Agrawal
95d9c120d3
More checks for instance writers.
2011-10-27 16:25:50 +05:30
Arun Agrawal
80fc29f36f
Adding more checks for instance_writer false
2011-10-27 15:47:56 +05:30
Arun Agrawal
485b99611b
Test fix Allow instances to disable record_timestamps
...
Removed here 0d0176c4ff
2011-10-27 15:41:15 +05:30
Pratik Naik
0d0176c4ff
Allow instances to disable record_timestamps
2011-10-26 18:20:12 +01:00
David Heinemeier Hansson
1d9ab88ee6
Merge branch 'master' of github.com:rails/rails
2011-10-25 17:22:55 -05:00
David Heinemeier Hansson
5daf07704a
Fix that changing a store should mark the store attribute as changed
2011-10-25 17:22:52 -05:00
Vijay Dev
ddce29bfa1
safeguard against configs missing environment or the database key
2011-10-26 00:41:41 +05:30
Joost Baaij
80bcfb00f7
Added a note that optimistic locking also needs a hidden field to function across web workers.
2011-10-25 13:57:24 +03:00
Xavier Noria
9dd168c402
minor revision to some new code in databases.rake
2011-10-24 14:46:28 +02:00
Xavier Noria
17bf04ff0d
registers PR #2419 in the CHANGELOG
2011-10-24 14:43:46 +02:00
Xavier Noria
b064614ffb
Merge pull request #2419 from dmitriy-kiriyenko/drop_test_database_in_development_when_running_rake_db_drop
...
When running "rake db:drop" also drop test database in development environment
2011-10-24 05:35:06 -07:00
Vijay Dev
8698debcc2
Merge branch 'master' of github.com:lifo/docrails
2011-10-23 01:38:37 +05:30
Vijay Dev
1c1c3fc2c0
minor fixes in the composed_of doc
2011-10-22 23:53:52 +05:30
Greg Reinacker
f092be821d
preserve decimal column attributes after migration
2011-10-21 17:30:39 -06:00
Prem Sichanugrist
f0be2cb192
Add some note on adding index to HABTM table
2011-10-20 17:15:28 -04:00
Prem Sichanugrist
d64e0955d0
Use new migration style in HABTM join table
...
Yes, we're on Rails 3.1 now.
2011-10-20 17:13:01 -04:00
Aaron Patterson
ee9d9fb5fa
Merge pull request #3258 from ileitch/3-1-stable
...
Postgres: Do not attempt to deallocate a statement if the connection is no longer active.
2011-10-20 08:45:22 -07:00
Aaron Patterson
c2f3c9bf56
only use now() on pg!
2011-10-18 13:30:01 -07:00
Aaron Patterson
6a28c512e3
reset prepared statement when schema changes imapact statement results. fixes #3335
2011-10-18 11:20:13 -07:00
Aaron Patterson
76af2818a6
use now() for dates in pg
2011-10-18 10:07:40 -07:00
José Valim
7511f9794d
Merge pull request #3340 from surfacedamage/exclude_destroy_in_all_blank_check
...
Exclude _destroy parameter in :all_blank check (issue #2937 )
2011-10-17 11:15:58 -07:00
Aaron Christy
8510a0bb5a
Exclude _destroy parameter in :all_blank check (issue #2937 )
2011-10-17 13:29:11 -04:00
Aaron Patterson
8919a68b96
Merge pull request #3334 from mperham/master
...
Default timestamps to non-null
2011-10-16 16:14:56 -07:00
Vishnu Atrai
9210458547
fix to remove warning in test cases
2011-10-16 14:29:06 +05:30
Mike Perham
3dbedd2823
Default timestamps to non-null
2011-10-14 21:09:53 -07:00