Changes are now being tracked in the releases section of the repository.
v2.8.1 (2020-12-17)
Implemented enhancements:
Fixed bugs:
- New version raises an error with ActiveSupport::LogSubscriber #128
- Weird logs when tenant fails to create #127
Closed issues:
v2.8.0 (2020-12-16)
Implemented enhancements:
- Uses a transaction to create a tenant #66
Fixed bugs:
- Fix seeding errors #86
- When tests run in a transaction, new tenants in tests fail to create #123
- Reverted unsafe initializer - introduces the possibility of disabling the initial connection to the database via environment variable. Relates to the following tickets/PRs:
Closed issues:
v2.7.2 (2020-07-17)
Implemented enhancements:
- Deprecate History.md #80
Fixed bugs:
- Tenant.switch! raises exception on first call / Postgresql #92
- NameError: instance variable @sequence_name not defined #81
Closed issues:
- Error creating tenant with uuid column #85
- enhanced db:create task breaks plugins compatibility #82
- Support disabling of full_migration_on_create #30
Merged pull requests:
- [Chore] Fix Changelog github action #97 (rpbaltazar)
- Prepare release - 2.7.2 #96 (rpbaltazar)
- [Resolves #92] tenant switch raises exception on first call #95 (rpbaltazar)
- Dont use custom rubocop #94 (rpbaltazar)
- [Resolves #80] added changelog action #90 (rpbaltazar)
- [Resolves #81] check for var existence before #89 (rpbaltazar)
v2.7.1 (2020-06-27)
Merged pull requests:
- Prepare Release 2.7.1 #84 (rpbaltazar)
- [Resolves #82] Enhanced db create task breaks plugins compatibility #83 (rpbaltazar)
- [ci] update rake #79 (ahorek)
v2.7.0 (2020-06-26)
Implemented enhancements:
- Rake tasks define methods on main #70
Fixed bugs:
Closed issues:
- configure story branch #68
- HISTORY.md has not been updated for latest releases #62
- [Postgresql users] Help testing development branch in your environment #34
Merged pull requests:
- Prepare Release - 2.7.0 #77 (rpbaltazar)
- [Fixes #61] db create is failed #76 (rpbaltazar)
- [Resolves #70] rake tasks define methods on main #75 (rpbaltazar)
- [Chore] Update travis config to run rubocop #74 (rpbaltazar)
- Remove and warn depracated config
tld\_length
#72 (choznerol) - [Resolves #62] added Missing notes in history.md #63 (rpbaltazar)
- Add database and schema to active record log #55 (woohoou)
v2.6.1 (2020-06-02)
Closed issues:
- db:rollback uses second latest migration for tenants #56
- rake db:setup tries to seed non existing tenant #52
- Custom Console deprecation warning #37
Merged pull requests:
- Version bump - 2.6.1 #60 (rpbaltazar)
- Prepare Release - 2.6.1 #59 (rpbaltazar)
- [#56] Db rollback uses second latest migration #57 (rpbaltazar)
- [#52] enhance after db create #54 (rpbaltazar)
- fix init after reload on development #53 (fsateler)
- fix: reset sequence_name after tenant switch #51 (fsateler)
- Avoid early connection #39 (fsateler)
v2.6.0 (2020-05-14)
Closed issues:
- Error Dropping Tenant #46
- After switch callback not working with nil argument #42
- Add tenant info to console boot? #41
- Support configuration for skip checking of schema existence before switching #26
Merged pull requests:
- [Resolves #37] Custom console deprecation warning #49 (rpbaltazar)
- Prepare Release 2.6.0 #48 (rpbaltazar)
- Add console welcome message #47 (JeremiahChurch)
- [Resolves #26] Support configuration for skip checking of schema existence before switching #45 (rpbaltazar)
- [Resolves #42] After switch callback not working with nil argument #43 (rpbaltazar)
v2.5.0 (2020-05-05)
Implemented enhancements:
Fixed bugs:
- When manually switching the connection it resets the search path #27
Closed issues:
- Cached statement breaks in find #35
- rails 6.1.alpha support #6
- How to exclude all models from engine? #4
Merged pull requests:
- Prepare Release 2.5.0 #44 (rpbaltazar)
- [Resolves #27] Added before hook to connected to to try to set the tenant #40 (rpbaltazar)
- [Resolves #35] update cache key to use a string or an array #36 (rpbaltazar)
- [Hotfix #27] Some errors were being thrown due to caching issues #33 (rpbaltazar)
- [Resolves #31] Add latest ruby verisons to test matrix #32 (rpbaltazar)
- [Chore] refactored files to their names #29 (rpbaltazar)
- [Resolves #27] When manually switching the connection it resets the search path #28 (rpbaltazar)
- [Resolves #11] Remove old ruby and rails versions from the supported versions #20 (rpbaltazar)
- Support rails 6.1 #7 (jean-francois-labbe)
2.4.0 (2020-04-01)
Implemented enhancements:
- Add console info about tenants and fast switches #14
- Update travis config to only run PR's instead of running all commits #12
Closed issues:
Merged pull requests:
- Fix gemspec open versions and updated version #25 (rpbaltazar)
- Fix gemspec open versions and updated version #24 (rpbaltazar)
- Cleanup travis matrix #23 (rpbaltazar)
- Prepare v2.4.0 Release #22 (rpbaltazar)
- Updated readme badges #21 (rpbaltazar)
- Rescuing ActiveRecord::NoDatabaseError when dropping tenants #19 (rpbaltazar)
- Skip init if we're running webpacker:compile #18 (rpbaltazar)
- [Resolves #14] Add console info about tenants and fast switches #17 (rpbaltazar)
- Don't crash when no database connection is present #16 (ArthurWD)
- [Resolves #12] Update travis config to only run PRs instead of all commits #13 (rpbaltazar)
- [Chore] Fix rubocop usage #10 (rpbaltazar)
- [Resolves #9] Cleanup rubocop todo #8 (rpbaltazar)
- Rakefile should use mysql port from configuration #5 (jean-francois-labbe)
v2.3.0 (2020-01-03)
Merged pull requests:
- [Resolves] Basic support for Rails 6 #1 (rpbaltazar)
v2.2.1 (2019-06-19)
v2.2.0 (2018-04-13)
v2.1.0 (2017-12-15)
v2.0.0 (2017-07-26)
v1.2.0 (2016-07-28)
v1.1.0 (2016-05-26)
v1.0.2 (2015-07-02)
v1.0.1 (2015-04-28)
v1.0.0 (2015-02-03)
v0.26.1 (2015-01-13)
v0.26.0 (2015-01-05)
v0.25.2 (2014-09-08)
v0.25.1 (2014-07-17)
v0.25.0 (2014-07-03)
v0.24.3 (2014-03-05)
v0.24.2 (2014-02-24)
v0.24.1 (2014-02-21)
v0.24.0 (2014-02-21)
v0.23.2 (2014-01-09)
v0.23.1 (2014-01-08)
v0.23.0 (2013-12-15)
v0.22.1 (2013-08-21)
v0.22.0 (2013-07-09)
v0.21.1 (2013-05-31)
v0.21.0 (2013-04-25)
v0.20.0 (2013-02-06)
rm (2013-01-30)
v0.19.2 (2013-01-30)
v0.19.0 (2012-12-30)
v0.18.0 (2012-11-28)
v0.17.3 (2012-11-20)
v0.17.2 (2012-11-15)
v0.17.1 (2012-10-30)
v0.17.0 (2012-09-26)
v0.16.0 (2012-06-01)
v0.15.0 (2012-03-18)
v0.14.4 (2012-03-08)
v0.14.3 (2012-02-21)
v0.14.2 (2012-02-21)
v0.13.0.1 (2012-02-09)
v0.14.1 (2011-12-13)
v0.14.0 (2011-12-13)
v0.13.1 (2011-11-08)
v0.13.0 (2011-10-25)
v0.12.0 (2011-10-04)
v0.11.1 (2011-09-22)
v0.11.0 (2011-09-20)
v0.10.3 (2011-09-20)
v0.10.2 (2011-09-15)
v0.10.1 (2011-08-11)
v0.10.0 (2011-07-29)
v0.9.2 (2011-07-04)
v0.9.1 (2011-06-24)
v0.9.0 (2011-06-23)
v0.8.0 (2011-06-23)
v0.7.0 (2011-06-22)
v0.6.0 (2011-06-21)
0.6.0 (2011-06-21)
v0.5.1 (2011-06-21)
0.5.0 (2011-06-20)
v0.5.0 (2011-06-20)
v0.1.3 (2011-04-18)
Implemented enhancements:
- N/a
Fixed bugs:
- [Resolves #82] Enhanced db:create breaks plugin compatibility - rails-on-services#83
Closed issues:
- Update rake version in development
- Renamed gemspec to match gem name
Implemented enhancements:
- [Resolves #70] Rake tasks define methods on main - rails-on-services#75
- Add database and schema to active record log. Configurable, defaults to false to keep current behavior - rails-on-services#55
Fixed bugs:
- [Fixes #61] Fix database create in mysql - rails-on-services#76
Closed issues:
- Remove deprecated tld_length config option: tld_length was removed in influitive#309, this configuration option doesn't have any effect now. - rails-on-services#72
- Using diffend.io proxy to safely check required gems
- Added story branch to the configuration
- Using travis-ci to run rubocop as well, replacing github actions: github actions do not work in fork's PRs
Implemented enhancements:
- N/a
Fixed bugs:
- [Resolves influitive#607] Avoid early connection
- [Resolves #52] Rake db:setup tries to seed non existent tenant - rails-on-services#54
- [Resolves #56] DB rollback uses second last migration - rails-on-services#57
#Closed issues:
- N/a
Implemented enhancements:
- [Resolves #26] Support configuration for skip checking of schema existence before switching
- [Resolves #41] Add tenant info to console boot
Fixed bugs:
- [Resolves #37] Custom Console deprecation warning
- [Resolves #42] After switch callback not working with nil argument
#Closed issues:
- Updated github actions configuration to run on PRs as well
Implemented enhancements:
- [Resolves #6] Adds support for rails 6.1
- [Resolves #27] Adds support to not rely on set search path, but instead prepends the schema name to the table name when using postgresql with schemas.
- [Resolves #35] Cache keys are now tenant dependent
Fixed bugs:
- [Resolves #27] Manually switching connection between read and write forgets the schema
#Closed issues:
- [Resolves #31] Add latest ruby versions to test matrix
Implemented enhancements:
- [Resolves #14] Add console info about tenants and fast switches #17
- Skip init if we're running webpacker:compile #18
Fixed bugs:
- Don't crash when no database connection is present #16
- Rescuing ActiveRecord::NoDatabaseError when dropping tenants #19
#Closed issues:
- Rakefile should use mysql port from configuration #5
- [Resolves #9] Cleanup rubocop todo #8
- Cleanup travis matrix #23
- January 3, 2020
Implemented enhancements:
- Basic support for rails 6
- Released different gem name, with same API as apartment
- June 19, 2019
Implemented enhancements:
- #566: IGNORE_EMPTY_TENANTS environment variable to ignore empty tenants warning. [Pysis868]
Fixed bugs:
- #586: Ignore
CREATE SCHEMA public
statement in pg dump [artemave] - #549: Fix Postgres schema creation with dump SQL [ancorcruz]
- April 14, 2018
Implemented enhancements:
- #523: Add Rails 5.2 support [IngusSkaistkalns]
- #504: Test against Ruby 2.5.0 [ahorek]
- #528: Test against Rails 5.2 [meganemura]
Removed:
- #504: Remove Rails 4.0/4.1 support [ahorek]
- #545: Stop supporting for JRuby + Rails 5.0 [meganemura]
Fixed bugs:
- #537: Fix PostgresqlSchemaFromSqlAdapter for newer PostgreSQL [shterrett]
- #532: Issue is reported by [aldrinmartoq]
- #519: Fix exception when main database doesn't exist [mayeco]
Closed issues:
- #514: Fix typo [menorval]
- December 15, 2017
- Add
parallel_migration_threads
configuration option for running migrations in parallel [ryanbrunner] - Drop Ruby 2.0.0 support [meganemura]
- ignore_private when parsing subdomains with PublicSuffix [michiomochi]
- Ignore row_security statements in psql dumps for backward compatibility [meganemura]
- "Host" elevator [shrmnk]
- Enhance db:drop task to act on all tenants [kuzukuzu]
- July 26, 2017
- Raise FileNotFound rather than abort when loading files [meganemura]
- Add 5.1 support with fixes for deprecations [meganemura]
- Fix tests for 5.x and a host of dev-friendly improvements [meganemura]
- Keep query cache config after switching databases [fernandomm]
- Pass constants not strings to middleware stack (Rails 5) [tzabaman]
- Remove deprecations from 1.0.0 [caironoleto]
- Replace
tld_length
configuration option with PublicSuffix gem for the subdomain elevator [humancopy] - Pass full config to create_database to allow :encoding/:collation/etc [kakipo]
- Don't retain a connection during initialization [mikecmpbll]
- Fix database name escaping in drop_command [mikecmpbll]
- Skip initialization for assets:clean and assets:precompile tasks [frank-west-iii]
- July 28, 2016
- Official Rails 5 support
- May 26, 2016
- Reset tenant after each request
- Support callbacks on switch [cbeer]
- Preliminary support for separate database hosts [apneadiving]
- July 2, 2015
- Fix pg_dump env vars - pull/208 [MitinPavel]
- Allow custom seed data file - pull/234 [typeoneerror]
- April 28, 2015
- Fix
Apartment::Deprecation
which was rescuing all exceptions
- Feb 3, 2015
- [BREAKING CHANGE]
Apartment::Tenant.process
is deprecated in favour ofApartment::Tenant.switch
- [BREAKING CHANGE]
Apartment::Tenant.switch
without a block is deprecated in favour ofApartment::Tenant.switch!
- Raise proper
TenantNotFound
,TenantExists
exceptions - Deprecate old
SchemaNotFound
,DatabaseNotFound
exceptions
- Jan 13, 2015
- Fixed schema quoting bug [jonsgreen]
- Jan 5, 2015
- Rails 4.2 support
- Sept 8, 2014
- Heroku fix on
assets:precompile
- pull/169 [rabbitt]
- July 17, 2014
- Fixed a few vestiges of Apartment::Database
- July 3, 2014
- [BREAKING CHANGE] -
Apartment::Database
is not deprecated in favour ofApartment::Tenant
- ActiveRecord (and Rails) 4.1 now supported
- A new sql based adapter that dumps the schema using sql
- March 5, 2014
- Rake enhancements weren't removed from the generator template
- February 24, 2014
- Better warnings if
apartment:migrate
is run
- February 21, 2014
- requiring
apartment/tasks/enhancements
in an initializer doesn't work - One can disable tenant migrations using
Apartment.db_migrate_tenants = false
in the Rakefile
- February 21, 2014 (In honour of the Women's Gold Medal in Hockey at Sochi)
- [BREAKING CHANGE]
apartment:migrate
task no longer depends ondb:migrate
- Instead, you can
require 'apartment/tasks/enhancements'
in your Apartment initializer - This will enhance
rake db:migrate
to also runapartment:migrate
- You can now forget about ever running
apartment:migrate
again
- Instead, you can
- Numerous deprecations for things referencing the word 'database'
- This is an ongoing effort to completely replace 'database' with 'tenant' as a better abstraction
- Note the obvious
Apartment::Database
still exists but will hopefully becomeApartment::Tenant
soon
- January 9, 2014
- Increased visibility of #parse_database_name warning
- January 8, 2014
- Schema adapters now initialize with default and persistent schemas
- Deprecated Apartment::Elevators#parse_database_name
- August 21, 2013
- Subdomain Elevator now allows for exclusions
- Delayed::Job has been completely removed
- August 21, 2013
- Fix bug where if your ruby process importing the database schema is run from a directory other than the app root, Apartment wouldn't know what schema_migrations to insert into the database (Rails only)
- June 9, 2013
- Numerous bug fixes:
- Mysql reset could connect to wrong database [eric88]
- Postgresql schema names weren't quoted properly [gdott9]
- Fixed error message on SchemaNotFound in
process
- HostHash elevator allows mapping host based on hash contents [gdott9]
- Official Sidekiq support with the apartment-sidekiq gem
- May 31, 2013
- Clearing the AR::QueryCache after switching databases.
- Fixes issue with stale model being loaded for schema adapters
- April 24, 2013
- JDBC support!! [PetrolMan]
- Feb 6, 2013
- Mysql now has a 'schema like' option to perform like Postgresql (default)
- This should be significantly more performant than using connections
- Psych is now supported for Delayed::Job yaml parsing
- Jan 30, 2013
- Database schema file can now be set manually or skipped altogether
- Jan 30, 2013
- Allow schema.rb import file to be specified in config or skip schema.rb import altogether
- Dec 29, 2012
- Apartment is now threadsafe
- New postgis adapter [zonpantli]
- Removed ActionDispatch dependency for use with Rack apps (regression)
- Nov 27, 2012
- Added
append_environment
config option [virtualstaticvoid] - Cleaned up the readme and generator documentation
- Added
connection_class
config option [smashtank] - Fixed a bug in pg adapter when missing schema
- Oct 30, 2012
- Fixed a bug where switching to an unknown db in mysql2 would crash the app [Frodotus]
- Sept 26, 2012
- Apartment has a new home!
- Support Sidekiq hooks to switch dbs [maedhr]
- Allow VERSION to be used on apartment:migrate [Bhavin Kamani]
- June 1, 2012
- Apartment now supports a default_schema to be set, rather than relying on ActiveRecord's default schema_search_path
- Additional schemas can always be maintained in the schema_search_path by configuring persistent_schemas [ryanbrunner]
- This means Hstore is officially supported!!
- There is now a full domain based elevator to switch dbs based on the whole domain [lcowell]
- There is now a generic elevator that takes a Proc to switch dbs based on the return value of that proc.
- March 18, 2012
- Remove Rails dependency, Apartment can now be used with any Rack based framework using ActiveRecord
- March 8, 2012
- Delayed::Job Hooks now return to the previous database, rather than resetting
- Feb 21, 2012
- Fix yaml serialization of non DJ models
- Feb 21, 2012
- Fix Delayed::Job yaml encoding with Rails > 3.0.x
- Dec 13, 2011
- Fix ActionDispatch::Callbacks deprecation warnings
- Dec 13, 2011
- Rails 3.1 Support
- Nov 8, 2011
- Reset prepared statement cache for rails 3.1.1 before switching dbs when using postgresql schemas
- Only necessary until the next release which will be more schema aware
- Oct 25, 2011
process
will now rescue with reset if the previous schema/db is no longer availablecreate
now takes an optional block which allows you to process within the newly created db- Fixed Rails version >= 3.0.10 and < 3.1 because there have been significant testing problems with 3.1, next version will hopefully fix this
- Oct 4, 2011
- Added a
drop
method for removing databases/schemas - Refactored abstract adapter to further remove duplication in concrete implementations
- Excluded models now take string references so they are properly reloaded in development
- Better silencing of
schema.rb
loading usingverbose
flag
- Sep 22, 2011
- Better use of Railties for initializing apartment
- The following changes were necessary as I haven't figured out how to properly hook into Rails reloading
- Added reloader middleware in development to init Apartment on each request
- Override
reload!
in console to also init Apartment
- Sep 20, 2011
- Excluded models no longer use a different connection when using postgresql schemas. Instead their table_name is prefixed with
public.
- Sep 20, 2011
- Fix improper raising of exceptions on create and reset
- Sep 15, 2011
- Remove all the annoying logging for loading db schema and seeding on create
- Aug 11, 2011
- Fixed bug in DJ where new objects (that hadn't been pulled from the db) didn't have the proper database assigned
- July 29, 2011
- Added better support for Delayed Job
- New config option that enables Delayed Job wrappers
- Note that DJ support uses a work-around in order to get queues stored in the public schema, not sure why it doesn't work out of the box, will look into it, until then, see documentation on queue'ng jobs
- July 4, 2011
- Migrations now run associated rails migration fully, fixes schema.rb not being reloaded after migrations
- June 24, 2011
- Hooks now take the payload object as an argument to fetch the proper db for DJ hooks
- June 23, 2011
- Added module to provide delayed job hooks
- June 23, 2011
- Added #current_database which will return the current database (or schema) name
- June 22, 2011
- Added apartment:seed rake task for seeding all dbs
- June 21, 2011
- Added #process to connect to new db, perform operations, then ensure a reset
- June 21, 2011
- Fixed db migrate up/down/rollback
- added db:redo
- June 20, 2011
- Added the concept of an "Elevator", a rack based strategy for db switching
- Added the Subdomain Elevator middleware to enabled db switching based on subdomain
- June 14, 2011
- Added
configure
method on Apartment instead of using yml file, allows for dynamic setting of db names to migrate for rake task - Added
seed_after_create
config option to import seed data to new db on create
- June 10, 2011
- Added full support for database migration
- Added in method to establish new connection for excluded models on startup rather than on each switch
- June 6, 2011 *
- Refactor to use more rails/active_support functionality
- Refactor config to lazily load apartment.yml if exists
- Remove OStruct and just use hashes for fetching methods
- Added schema load on create instead of migrating from scratch
- March 30, 2011 *
- Original pass from Ryan
* This Changelog was automatically generated by github_changelog_generator