2013-09-03 02:26:52 +08:00
|
|
|
# Ancestry Changelog
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
Doing our best at supporting [SemVer](http://semver.org/) with
|
2017-05-21 07:46:24 +08:00
|
|
|
a nice looking [Changelog](http://keepachangelog.com).
|
2016-10-25 22:46:23 +08:00
|
|
|
|
2020-08-04 06:09:55 +08:00
|
|
|
## Versions [3.1.0] <small>2018-11-06</small>
|
|
|
|
|
|
|
|
|
|
* `:primary_key_format` method lets you change syntax. good for uuids.
|
|
|
|
|
* changed code from being `ancestry` string to `ancestry_ids` focused. May break monkey patches.
|
|
|
|
|
* Moved many methods from `has_ancestry` and `InstanceMethods` to `MaterializedPath`. May break monkey patches.
|
|
|
|
|
* Removed tests for `mysql` driver. Starting with rails 4.1, it supports `mysql2` driver.
|
|
|
|
|
* Better documentation for relationships (thnx @dtamai and @d-m-u)
|
|
|
|
|
* Fix creating children in `after_*` callbacks ( thx @jstirk)
|
|
|
|
|
|
2019-06-07 00:41:35 +08:00
|
|
|
## Version [3.0.7] <small>2018-11-06</small>
|
|
|
|
|
|
|
|
|
|
* Fixed rails 5.1 change detection (thx @jrafanie)
|
2020-08-04 06:09:55 +08:00
|
|
|
* Introduce counter cache (thx @hw676018683)
|
2019-06-07 00:41:35 +08:00
|
|
|
|
2019-04-24 22:54:05 +08:00
|
|
|
## Version [3.0.6] <small>2018-11-06</small>
|
2018-04-17 08:25:59 +08:00
|
|
|
|
2019-04-24 22:54:05 +08:00
|
|
|
* Fixed rails 4.1 version check (thx @myxoh)
|
2018-04-17 08:25:59 +08:00
|
|
|
|
2018-11-07 02:07:59 +08:00
|
|
|
## Version [3.0.5] <small>2018-11-06</small>
|
|
|
|
|
|
|
|
|
|
## Changed
|
|
|
|
|
|
|
|
|
|
* Added indirect children support (thx @tilo)
|
2019-04-24 22:54:05 +08:00
|
|
|
* Fixed test sorting for pg on mac osx
|
2018-11-07 02:07:59 +08:00
|
|
|
|
|
|
|
|
## Fixes
|
|
|
|
|
|
|
|
|
|
* Reduced memory footprint of parsing ancestry column (thx @NickLaMuro)
|
|
|
|
|
|
2018-10-27 13:44:11 +08:00
|
|
|
## Version [3.0.4] <small>2018-10-27</small>
|
|
|
|
|
|
|
|
|
|
## Fixes
|
|
|
|
|
|
|
|
|
|
* Properly detects non-integer columns (thx @adam101)
|
|
|
|
|
* Arrange no longer drops nodes due to missing parents (thx @trafium)
|
|
|
|
|
|
|
|
|
|
## Version [3.0.3] <small>2018-10-23</small>
|
2018-10-23 23:42:35 +08:00
|
|
|
|
|
|
|
|
This branch (3.x) should still be compatible with rails 3 and 4.
|
|
|
|
|
Rails 5.1 and 5.2 support were introduced in this version, but ongoing support
|
|
|
|
|
has been moved to ancestry 4.0
|
|
|
|
|
|
|
|
|
|
## Fixes
|
|
|
|
|
|
|
|
|
|
* Reduce object allocation (thx @NickLaMuro)
|
|
|
|
|
* Rails 5.1 fixes (thx @ctrombley)
|
|
|
|
|
* Avoid redundant query to DB in subtree_of scope (thx @Slike9)
|
|
|
|
|
* Syntax tweaks (thx @ekohl, @richardonrails)
|
|
|
|
|
* Fixed reverse ordering
|
|
|
|
|
* Dropped builds for ruby 1.9.3, 2.0, 2.1, and 2.2
|
|
|
|
|
* Dropped builds for Rails 3.x and 4.x (will use Active Record `or` syntax)
|
|
|
|
|
|
2018-04-17 08:25:59 +08:00
|
|
|
## Version [3.0.2] <small>2018-04-24</small>
|
|
|
|
|
|
|
|
|
|
## Fixes
|
|
|
|
|
|
|
|
|
|
* fixed `order_by_ancestry` bug
|
|
|
|
|
* fixed order tests for postgres on mac (it uses a different collation)
|
|
|
|
|
* fixed documentation (thx @besquared, @danfrenette, @eiwi1101, @isimluk, @mabusaad, @tilsammans)
|
|
|
|
|
* added missing `Ancestry::version`
|
|
|
|
|
* added Rails 5.2 support (thx @jjuliano)
|
2016-10-25 22:46:23 +08:00
|
|
|
|
2017-07-06 02:28:44 +08:00
|
|
|
## Version [3.0.1] <small>2017-07-05</small>
|
|
|
|
|
|
|
|
|
|
## Fixes
|
|
|
|
|
|
|
|
|
|
* added gem metadata
|
|
|
|
|
* fixed keep a changelog link (thx @mattbrictson)
|
|
|
|
|
* added alias has_parent?
|
|
|
|
|
* fixed bug where unscoping too much (thx @brendon)
|
|
|
|
|
* fixed tests on mysql 5.7 and rails 3.2
|
|
|
|
|
* Dropped 3.1 scope changes
|
|
|
|
|
|
2017-05-19 07:26:45 +08:00
|
|
|
## Version [3.0.0] <small>2017-05-18</small>
|
|
|
|
|
|
2017-05-06 00:59:05 +08:00
|
|
|
## Changed
|
|
|
|
|
|
2017-05-19 07:26:45 +08:00
|
|
|
* Dropping Rails 3.0, and 3.1. Added Rails 5.1 support (thx @ledermann)
|
|
|
|
|
* Dropping Rails 4.0, 4.1 for build reasons. Since 4.2 is supported, all 4.x should still work.
|
2017-05-06 00:59:05 +08:00
|
|
|
|
|
|
|
|
## Fixes
|
|
|
|
|
|
|
|
|
|
* Performance: Use `pluck` vs `map` for ids (thx @njakobsen and @culturecode)
|
|
|
|
|
* Fixed acts_as_tree compatibility (thx @crazymykl)
|
|
|
|
|
* Fixed loading ActiveRails prematurely (thx @vovimayhem)
|
2017-05-19 07:26:45 +08:00
|
|
|
* Fixes exist (thx @ledermann)
|
|
|
|
|
* Properly touches parents when different class for STI (thx @samtgarson)
|
|
|
|
|
* Fixed issues with parent_id (only present on master) (thx @domcleal)
|
2017-05-06 00:59:05 +08:00
|
|
|
|
2016-11-02 04:52:49 +08:00
|
|
|
## Version [2.2.2] <small>2016-11-01</small>
|
|
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
|
|
|
|
|
* Use `COALESCE` only for sorting versions greater than 5.0
|
|
|
|
|
* Fixed bug with explicit order clauses (introduced in 2.2.0)
|
|
|
|
|
* No longer load schema on `has_ancestry` load (thx @ledermann)
|
|
|
|
|
|
2016-10-26 05:01:22 +08:00
|
|
|
## Version [2.2.1] <small>2016-10-25</small>
|
|
|
|
|
|
|
|
|
|
Sorry for blip, local master got out of sync with upstream master.
|
|
|
|
|
Missed 2 commits (which are feature adds)
|
|
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
* Use like (vs ilike) for rails 5.0 (performance enhancement)
|
|
|
|
|
* Use `COALESCE` for sorting on pg, mysql, and sqlite vs `CASE`
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [2.2.0] <small>2016-10-25</small>
|
|
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
* Predicates for scopes: e.g.: `ancestor_of?`, `parent_of?` (thx @neglectedvalue)
|
|
|
|
|
* Scope `path_of`
|
|
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
* `arrange` now accepts blocks (thx @mastfish)
|
|
|
|
|
* Performance tuning `arrange_node` (thx @fryguy)
|
|
|
|
|
* In orphan strategy, set `ancestry` to `nil` for no parents (thx @haslinger)
|
|
|
|
|
* Only updates `updated_at` when a record is changed (thx @brocktimus)
|
|
|
|
|
* No longer casts text primary key as an integer
|
|
|
|
|
* Upgrading tests for ruby versions (thx @brocktimus, @fryguy, @yui-knk)
|
|
|
|
|
* Fix non-default ancestry not getting used properly (thx @javiyu)
|
|
|
|
|
|
|
|
|
|
## Version [2.1.0] <small>2014-04-16</small>
|
|
|
|
|
* Added arrange_serializable (thx @krishandley, @chicagogrrl)
|
|
|
|
|
* Add the :touch to update ancestors on save (thx @adammck)
|
|
|
|
|
* Change conditions into arel (thx @mlitwiniuk)
|
|
|
|
|
* Added children? & siblings? alias (thx @bigtunacan)
|
|
|
|
|
* closure_tree compatibility (thx @gzigzigzeo)
|
|
|
|
|
* Performance tweak (thx @mjc)
|
|
|
|
|
* Improvements to organization (thx @xsuchy, @ryakh)
|
|
|
|
|
|
|
|
|
|
## Version [2.0.0] <small>2013-05-17</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Removed rails 2 compatibility
|
2016-10-25 22:46:23 +08:00
|
|
|
* Added table name to condition constructing methods (thx @aflatter)
|
|
|
|
|
* Fix depth_cache not being updated when moving up to ancestors (thx @scottatron)
|
|
|
|
|
* add alias :root? to existing is_root? (thx @divineforest)
|
|
|
|
|
* Add block to sort_by_ancestry (thx @Iliya)
|
|
|
|
|
* Add attribute query method for parent_id (thx @sj26)
|
|
|
|
|
* Fixed and tested for rails 4 (thx @adammck, @Nihad, @Systho, @Philippe, e.a.)
|
|
|
|
|
* Fixed overwriting ActiveRecord::Base.base_class (thx @Rozhnov)
|
2013-09-03 02:26:52 +08:00
|
|
|
* New adopt strategy (thx unknown)
|
|
|
|
|
* Many more improvements
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.3.0] <small>2012-05-04</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Ancestry now ignores default scopes when moving or destroying nodes, ensuring tree consistency
|
|
|
|
|
* Changed ActiveRecord dependency to 2.3.14
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.2.5] <small>2012-03-15</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Fixed warnings: "parenthesize argument(s) for future version"
|
|
|
|
|
* Fixed a bug in the restore_ancestry_integrity! method (thx Arthur Holstvoogd)
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.2.4] <small>2011-04-22</small>
|
|
|
|
|
* Prepended table names to column names in queries (thx @raelik)
|
|
|
|
|
* Better check to see if acts_as_tree can be overloaded (thx @jims)
|
|
|
|
|
* Performance inprovements (thx @kueda)
|
2013-09-03 02:26:52 +08:00
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.2.3] <small>2010-10-28</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Fixed error with determining ActiveRecord version
|
2016-10-25 22:46:23 +08:00
|
|
|
* Added option to specify :primary_key_format (thx @rolftimmermans)
|
2013-09-03 02:26:52 +08:00
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.2.2] <small>2010-10-24</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Fixed all deprecation warnings for rails 3.0.X
|
2016-10-25 22:46:23 +08:00
|
|
|
* Added `:report` option to `check_ancestry_integrity!`
|
2013-09-03 02:26:52 +08:00
|
|
|
* Changed ActiveRecord dependency to 2.2.2
|
|
|
|
|
* Tested and fixed for ruby 1.8.7 and 1.9.2
|
2016-10-25 22:46:23 +08:00
|
|
|
* Changed usage of `update_attributes` to `update_attribute` to allow ancestry column protection
|
2013-09-03 02:26:52 +08:00
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.2.0] <small>2009-11-07</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Removed some duplication in has_ancestry
|
|
|
|
|
* Cleaned up plugin pattern according to http://yehudakatz.com/2009/11/12/better-ruby-idioms/
|
|
|
|
|
* Moved parts of ancestry into seperate files
|
|
|
|
|
* Made it possible to pass options into the arrange method
|
|
|
|
|
* Renamed acts_as_tree to has_ancestry
|
|
|
|
|
* Aliased has_ancestry as acts_as_tree if acts_as_tree is available
|
|
|
|
|
* Added subtree_of scope
|
|
|
|
|
* Updated ordered_by_ancestry scope to support Microsoft SQL Server
|
|
|
|
|
* Added empty hash as parameter to exists? calls for older ActiveRecord versions
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.1.4] <small>2009-11-07</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Thanks to a patch from tom taylor, Ancestry now works with different primary keys
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.1.3] <small>2009-11-01</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Fixed a pretty bad bug where several operations took far too many queries
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.1.2] <small>2009-10-29</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Added validation for depth cache column
|
|
|
|
|
* Added STI support (reported broken)
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.1.1] <small>2009-10-28</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Fixed some parentheses warnings that where reported
|
|
|
|
|
* Fixed a reported issue with arrangement
|
|
|
|
|
* Fixed issues with ancestors and path order on postgres
|
|
|
|
|
* Added ordered_by_ancestry scope (needed to fix issues)
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version [1.1.0] <small>2009-10-22</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Depth caching (and cache rebuilding)
|
|
|
|
|
* Depth method for nodes
|
|
|
|
|
* Named scopes for selecting by depth
|
|
|
|
|
* Relative depth options for tree navigation methods:
|
|
|
|
|
* ancestors
|
|
|
|
|
* path
|
|
|
|
|
* descendants
|
|
|
|
|
* descendant_ids
|
|
|
|
|
* subtree
|
|
|
|
|
* subtree_ids
|
|
|
|
|
* Updated README
|
|
|
|
|
* Easy migration from existing plugins/gems
|
|
|
|
|
* acts_as_tree checks unknown options
|
|
|
|
|
* acts_as_tree checks that options are hash
|
|
|
|
|
* Added a bang (!) to the integrity functions
|
|
|
|
|
* Since these functions should only be used from ./script/console and not
|
|
|
|
|
from your application, this change is not considered as breaking backwards
|
|
|
|
|
compatibility and the major version wasn't bumped.
|
|
|
|
|
* Updated install script to point to documentation
|
|
|
|
|
* Removed rails specific init
|
|
|
|
|
* Removed uninstall script
|
|
|
|
|
|
2016-10-25 22:46:23 +08:00
|
|
|
## Version 1.0.0 <small>2009-10-16</small>
|
2013-09-03 02:26:52 +08:00
|
|
|
* Initial version
|
|
|
|
|
* Tree building
|
|
|
|
|
* Tree navigation
|
|
|
|
|
* Integrity checking / restoration
|
|
|
|
|
* Arrangement
|
|
|
|
|
* Orphan strategies
|
|
|
|
|
* Subtree movement
|
|
|
|
|
* Named scopes
|
|
|
|
|
* Validations
|
2016-10-25 22:46:23 +08:00
|
|
|
|
|
|
|
|
|
2020-08-04 06:09:55 +08:00
|
|
|
[3.1.0]: https://github.com/stefankroes/ancestry/compare/v3.0.7...v3.1.0
|
|
|
|
|
[3.0.7]: https://github.com/stefankroes/ancestry/compare/v3.0.6...v3.0.7
|
2019-04-24 22:54:05 +08:00
|
|
|
[3.0.6]: https://github.com/stefankroes/ancestry/compare/v3.0.5...v3.0.6
|
2018-11-07 02:07:59 +08:00
|
|
|
[3.0.5]: https://github.com/stefankroes/ancestry/compare/v3.0.4...v3.0.5
|
2018-10-27 13:44:11 +08:00
|
|
|
[3.0.4]: https://github.com/stefankroes/ancestry/compare/v3.0.3...v3.0.4
|
|
|
|
|
[3.0.3]: https://github.com/stefankroes/ancestry/compare/v3.0.2...v3.0.3
|
2018-04-17 08:25:59 +08:00
|
|
|
[3.0.2]: https://github.com/stefankroes/ancestry/compare/v3.0.1...v3.0.2
|
|
|
|
|
[3.0.1]: https://github.com/stefankroes/ancestry/compare/v3.0.0...v3.0.1
|
2017-05-19 07:26:45 +08:00
|
|
|
[3.0.0]: https://github.com/stefankroes/ancestry/compare/v2.2.2...v3.0.0
|
2016-11-02 04:52:49 +08:00
|
|
|
[2.2.2]: https://github.com/stefankroes/ancestry/compare/v2.2.1...v2.2.2
|
2016-10-26 05:01:22 +08:00
|
|
|
[2.2.1]: https://github.com/stefankroes/ancestry/compare/v2.2.0...v2.2.1
|
2016-10-25 22:46:23 +08:00
|
|
|
[2.2.0]: https://github.com/stefankroes/ancestry/compare/v2.1.0...v2.2.0
|
|
|
|
|
[2.1.0]: https://github.com/stefankroes/ancestry/compare/v2.0.0...v2.1.0
|
|
|
|
|
[2.0.0]: https://github.com/stefankroes/ancestry/compare/v1.3.0...v2.0.0
|
|
|
|
|
[1.3.0]: https://github.com/stefankroes/ancestry/compare/v1.2.5...v1.3.0
|
|
|
|
|
[1.2.5]: https://github.com/stefankroes/ancestry/compare/v1.2.4...v1.2.5
|
|
|
|
|
[1.2.4]: https://github.com/stefankroes/ancestry/compare/v1.2.3...v1.2.4
|
|
|
|
|
[1.2.3]: https://github.com/stefankroes/ancestry/compare/v1.2.2...v1.2.3
|
|
|
|
|
[1.2.2]: https://github.com/stefankroes/ancestry/compare/v1.2.0...v1.2.2
|
|
|
|
|
[1.2.0]: https://github.com/stefankroes/ancestry/compare/v1.1.4...v1.2.0
|
|
|
|
|
[1.1.4]: https://github.com/stefankroes/ancestry/compare/v1.1.3...v1.1.4
|
|
|
|
|
[1.1.3]: https://github.com/stefankroes/ancestry/compare/v1.1.2...v1.1.3
|
|
|
|
|
[1.1.2]: https://github.com/stefankroes/ancestry/compare/v1.1.1...v1.1.2
|
|
|
|
|
[1.1.1]: https://github.com/stefankroes/ancestry/compare/v1.1.0...v1.1.1
|
|
|
|
|
[1.1.0]: https://github.com/stefankroes/ancestry/compare/v1.0.0...v1.1.0
|