ros-apartment 2.3.0 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +78 -0
- data/.github/workflows/changelog.yml +63 -0
- data/.github/workflows/reviewdog.yml +22 -0
- data/.pryrc +5 -3
- data/.rubocop.yml +32 -0
- data/.rubocop_todo.yml +233 -0
- data/.ruby-version +1 -0
- data/.story_branch.yml +5 -0
- data/Appraisals +29 -42
- data/CHANGELOG.md +963 -0
- data/Gemfile +2 -7
- data/Guardfile +3 -16
- data/HISTORY.md +159 -68
- data/README.md +101 -21
- data/Rakefile +39 -22
- data/TODO.md +0 -1
- data/gemfiles/rails_5_2.gemfile +0 -5
- data/gemfiles/rails_6_0.gemfile +4 -9
- data/gemfiles/rails_6_1.gemfile +17 -0
- data/gemfiles/rails_7_0.gemfile +17 -0
- data/gemfiles/rails_master.gemfile +3 -8
- data/lib/apartment/active_record/connection_handling.rb +20 -0
- data/lib/apartment/active_record/internal_metadata.rb +9 -0
- data/lib/apartment/active_record/postgresql_adapter.rb +39 -0
- data/lib/apartment/active_record/schema_migration.rb +11 -0
- data/lib/apartment/adapters/abstract_adapter.rb +52 -46
- data/lib/apartment/adapters/abstract_jdbc_adapter.rb +5 -3
- data/lib/apartment/adapters/jdbc_mysql_adapter.rb +3 -3
- data/lib/apartment/adapters/jdbc_postgresql_adapter.rb +19 -13
- data/lib/apartment/adapters/mysql2_adapter.rb +15 -9
- data/lib/apartment/adapters/postgis_adapter.rb +3 -2
- data/lib/apartment/adapters/postgresql_adapter.rb +79 -31
- data/lib/apartment/adapters/sqlite3_adapter.rb +18 -8
- data/lib/apartment/console.rb +23 -11
- data/lib/apartment/custom_console.rb +42 -0
- data/lib/apartment/deprecation.rb +2 -1
- data/lib/apartment/elevators/domain.rb +4 -3
- data/lib/apartment/elevators/first_subdomain.rb +3 -2
- data/lib/apartment/elevators/generic.rb +4 -3
- data/lib/apartment/elevators/host.rb +6 -1
- data/lib/apartment/elevators/host_hash.rb +6 -2
- data/lib/apartment/elevators/subdomain.rb +9 -5
- data/lib/apartment/log_subscriber.rb +33 -0
- data/lib/apartment/migrator.rb +4 -3
- data/lib/apartment/model.rb +29 -0
- data/lib/apartment/railtie.rb +16 -20
- data/lib/apartment/tasks/enhancements.rb +4 -6
- data/lib/apartment/tasks/task_helper.rb +52 -0
- data/lib/apartment/tenant.rb +7 -10
- data/lib/apartment/version.rb +3 -1
- data/lib/apartment.rb +56 -15
- data/lib/generators/apartment/install/install_generator.rb +4 -3
- data/lib/generators/apartment/install/templates/apartment.rb +10 -3
- data/lib/tasks/apartment.rake +48 -87
- data/ros-apartment.gemspec +59 -0
- metadata +148 -240
- data/.travis.yml +0 -65
- data/apartment.gemspec +0 -47
- data/gemfiles/rails_4_2.gemfile +0 -23
- data/gemfiles/rails_5_0.gemfile +0 -22
- data/gemfiles/rails_5_1.gemfile +0 -22
- data/lib/apartment/reloader.rb +0 -21
- data/spec/adapters/jdbc_mysql_adapter_spec.rb +0 -19
- data/spec/adapters/jdbc_postgresql_adapter_spec.rb +0 -41
- data/spec/adapters/mysql2_adapter_spec.rb +0 -59
- data/spec/adapters/postgresql_adapter_spec.rb +0 -61
- data/spec/adapters/sqlite3_adapter_spec.rb +0 -83
- data/spec/apartment_spec.rb +0 -11
- data/spec/config/database.yml.sample +0 -49
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/controllers/application_controller.rb +0 -6
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/company.rb +0 -3
- data/spec/dummy/app/models/user.rb +0 -3
- data/spec/dummy/app/views/application/index.html.erb +0 -1
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config/application.rb +0 -49
- data/spec/dummy/config/boot.rb +0 -11
- data/spec/dummy/config/database.yml.sample +0 -44
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -28
- data/spec/dummy/config/environments/production.rb +0 -51
- data/spec/dummy/config/environments/test.rb +0 -34
- data/spec/dummy/config/initializers/apartment.rb +0 -4
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -10
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/20110613152810_create_dummy_models.rb +0 -39
- data/spec/dummy/db/migrate/20111202022214_create_table_books.rb +0 -14
- data/spec/dummy/db/migrate/20180415260934_create_public_tokens.rb +0 -13
- data/spec/dummy/db/schema.rb +0 -55
- data/spec/dummy/db/seeds/import.rb +0 -5
- data/spec/dummy/db/seeds.rb +0 -5
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -26
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/dummy_engine/.gitignore +0 -8
- data/spec/dummy_engine/Gemfile +0 -15
- data/spec/dummy_engine/Rakefile +0 -34
- data/spec/dummy_engine/bin/rails +0 -12
- data/spec/dummy_engine/config/initializers/apartment.rb +0 -51
- data/spec/dummy_engine/dummy_engine.gemspec +0 -24
- data/spec/dummy_engine/lib/dummy_engine/engine.rb +0 -4
- data/spec/dummy_engine/lib/dummy_engine/version.rb +0 -3
- data/spec/dummy_engine/lib/dummy_engine.rb +0 -4
- data/spec/dummy_engine/test/dummy/Rakefile +0 -6
- data/spec/dummy_engine/test/dummy/config/application.rb +0 -22
- data/spec/dummy_engine/test/dummy/config/boot.rb +0 -5
- data/spec/dummy_engine/test/dummy/config/database.yml +0 -25
- data/spec/dummy_engine/test/dummy/config/environment.rb +0 -5
- data/spec/dummy_engine/test/dummy/config/environments/development.rb +0 -37
- data/spec/dummy_engine/test/dummy/config/environments/production.rb +0 -78
- data/spec/dummy_engine/test/dummy/config/environments/test.rb +0 -39
- data/spec/dummy_engine/test/dummy/config/initializers/assets.rb +0 -8
- data/spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy_engine/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy_engine/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy_engine/test/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy_engine/test/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy_engine/test/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy_engine/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy_engine/test/dummy/config/locales/en.yml +0 -23
- data/spec/dummy_engine/test/dummy/config/routes.rb +0 -56
- data/spec/dummy_engine/test/dummy/config/secrets.yml +0 -22
- data/spec/dummy_engine/test/dummy/config.ru +0 -4
- data/spec/examples/connection_adapter_examples.rb +0 -42
- data/spec/examples/generic_adapter_custom_configuration_example.rb +0 -95
- data/spec/examples/generic_adapter_examples.rb +0 -163
- data/spec/examples/schema_adapter_examples.rb +0 -234
- data/spec/integration/apartment_rake_integration_spec.rb +0 -107
- data/spec/integration/query_caching_spec.rb +0 -81
- data/spec/integration/use_within_an_engine_spec.rb +0 -28
- data/spec/schemas/v1.rb +0 -16
- data/spec/schemas/v2.rb +0 -43
- data/spec/schemas/v3.rb +0 -49
- data/spec/spec_helper.rb +0 -61
- data/spec/support/apartment_helpers.rb +0 -43
- data/spec/support/capybara_sessions.rb +0 -15
- data/spec/support/config.rb +0 -10
- data/spec/support/contexts.rb +0 -52
- data/spec/support/requirements.rb +0 -35
- data/spec/support/setup.rb +0 -46
- data/spec/tasks/apartment_rake_spec.rb +0 -129
- data/spec/tenant_spec.rb +0 -190
- data/spec/unit/config_spec.rb +0 -112
- data/spec/unit/elevators/domain_spec.rb +0 -32
- data/spec/unit/elevators/first_subdomain_spec.rb +0 -24
- data/spec/unit/elevators/generic_spec.rb +0 -54
- data/spec/unit/elevators/host_hash_spec.rb +0 -32
- data/spec/unit/elevators/host_spec.rb +0 -89
- data/spec/unit/elevators/subdomain_spec.rb +0 -76
- data/spec/unit/migrator_spec.rb +0 -77
- data/spec/unit/reloader_spec.rb +0 -24
data/Gemfile
CHANGED
data/Guardfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# A sample Guardfile
|
2
4
|
# More info at https://github.com/guard/guard#readme
|
3
5
|
|
@@ -5,20 +7,5 @@ guard :rspec do
|
|
5
7
|
watch(%r{^spec/.+_spec\.rb$})
|
6
8
|
watch(%r{^lib/apartment/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
|
7
9
|
watch(%r{^lib/apartment/(.+)\.rb$}) { |m| "spec/integration/#{m[1]}_spec.rb" }
|
8
|
-
watch('spec/spec_helper.rb')
|
9
|
-
|
10
|
-
# # Rails example
|
11
|
-
# watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
12
|
-
# watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
13
|
-
# watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
14
|
-
# watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
15
|
-
# watch('config/routes.rb') { "spec/routing" }
|
16
|
-
# watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
17
|
-
|
18
|
-
# # Capybara features specs
|
19
|
-
# watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
20
|
-
|
21
|
-
# # Turnip features and steps
|
22
|
-
# watch(%r{^spec/acceptance/(.+)\.feature$})
|
23
|
-
# watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
10
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
24
11
|
end
|
data/HISTORY.md
CHANGED
@@ -1,42 +1,133 @@
|
|
1
|
-
#
|
1
|
+
# v2.7.1
|
2
|
+
|
3
|
+
**Implemented enhancements:**
|
4
|
+
|
5
|
+
- N/a
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- [Resolves #82] Enhanced db:create breaks plugin compatibility - <https://github.com/rails-on-services/apartment/pull/83>
|
10
|
+
|
11
|
+
**Closed issues:**
|
12
|
+
|
13
|
+
- Update rake version in development
|
14
|
+
- Renamed gemspec to match gem name
|
15
|
+
|
16
|
+
# v2.7.0
|
17
|
+
|
18
|
+
**Implemented enhancements:**
|
19
|
+
|
20
|
+
- [Resolves #70] Rake tasks define methods on main - <https://github.com/rails-on-services/apartment/pull/75>
|
21
|
+
- Add database and schema to active record log. Configurable, defaults to false to keep current behavior - <https://github.com/rails-on-services/apartment/pull/55>
|
22
|
+
|
23
|
+
**Fixed bugs:**
|
24
|
+
|
25
|
+
- [Fixes #61] Fix database create in mysql - <https://github.com/rails-on-services/apartment/pull/76>
|
26
|
+
|
27
|
+
**Closed issues:**
|
28
|
+
|
29
|
+
- Remove deprecated tld_length config option: tld_length was removed in influitive#309, this configuration option doesn't have any effect now. - <https://github.com/rails-on-services/apartment/pull/72>
|
30
|
+
- Using [diffend.io proxy](https://diffend.io) to safely check required gems
|
31
|
+
- Added [story branch](https://github.com/story-branch/story_branch) to the configuration
|
32
|
+
- Using travis-ci to run rubocop as well, replacing github actions: github actions do not work in fork's PRs
|
33
|
+
|
34
|
+
# v2.6.1
|
35
|
+
|
36
|
+
**Implemented enhancements:**
|
37
|
+
- N/a
|
38
|
+
|
39
|
+
**Fixed bugs:**
|
40
|
+
- [Resolves influitive#607] Avoid early connection
|
41
|
+
- <https://github.com/rails-on-services/apartment/pull/39>
|
42
|
+
- <https://github.com/rails-on-services/apartment/pull/53>
|
43
|
+
- <https://github.com/rails-on-services/apartment/pull/51>
|
44
|
+
- [Resolves #52] Rake db:setup tries to seed non existent tenant - <https://github.com/rails-on-services/apartment/pull/54>
|
45
|
+
- [Resolves #56] DB rollback uses second last migration - <https://github.com/rails-on-services/apartment/pull/57>
|
46
|
+
|
47
|
+
#**Closed issues:**
|
48
|
+
- N/a
|
49
|
+
|
50
|
+
# v2.6.0
|
51
|
+
|
52
|
+
**Implemented enhancements:**
|
53
|
+
- [Resolves #26] Support configuration for skip checking of schema existence before switching
|
54
|
+
- [Resolves #41] Add tenant info to console boot
|
55
|
+
|
56
|
+
**Fixed bugs:**
|
57
|
+
- [Resolves #37] Custom Console deprecation warning
|
58
|
+
- [Resolves #42] After switch callback not working with nil argument
|
59
|
+
|
60
|
+
#**Closed issues:**
|
61
|
+
- Updated github actions configuration to run on PRs as well
|
62
|
+
|
63
|
+
# v2.5.0
|
64
|
+
|
65
|
+
**Implemented enhancements:**
|
66
|
+
- [Resolves #6] Adds support for rails 6.1
|
67
|
+
- [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.
|
68
|
+
- [Resolves #35] Cache keys are now tenant dependent
|
69
|
+
|
70
|
+
**Fixed bugs:**
|
71
|
+
- [Resolves #27] Manually switching connection between read and write forgets the schema
|
72
|
+
|
73
|
+
#**Closed issues:**
|
74
|
+
- [Resolves #31] Add latest ruby versions to test matrix
|
75
|
+
|
76
|
+
# v2.4.0
|
77
|
+
|
78
|
+
**Implemented enhancements:**
|
79
|
+
- [Resolves #14] Add console info about tenants and fast switches #17
|
80
|
+
- Skip init if we're running webpacker:compile #18
|
81
|
+
|
82
|
+
**Fixed bugs:**
|
83
|
+
- Don't crash when no database connection is present #16
|
84
|
+
- Rescuing ActiveRecord::NoDatabaseError when dropping tenants #19
|
85
|
+
|
86
|
+
#**Closed issues:**
|
87
|
+
- Rakefile should use mysql port from configuration #5
|
88
|
+
- [Resolves #9] Cleanup rubocop todo #8
|
89
|
+
- Cleanup travis matrix #23
|
90
|
+
|
91
|
+
# v2.3.0
|
2
92
|
* January 3, 2020
|
3
93
|
|
4
|
-
|
94
|
+
**Implemented enhancements:**
|
5
95
|
- Basic support for rails 6
|
6
96
|
- Released different gem name, with same API as apartment
|
7
97
|
|
8
|
-
#
|
98
|
+
# v2.2.1
|
9
99
|
* June 19, 2019
|
10
100
|
|
11
|
-
|
101
|
+
**Implemented enhancements:**
|
12
102
|
- #566: IGNORE_EMPTY_TENANTS environment variable to ignore empty tenants
|
13
103
|
warning. [Pysis868]
|
14
104
|
|
15
|
-
|
105
|
+
**Fixed bugs:**
|
16
106
|
- #586: Ignore `CREATE SCHEMA public` statement in pg dump [artemave]
|
17
107
|
- #549: Fix Postgres schema creation with dump SQL [ancorcruz]
|
18
108
|
|
19
|
-
#
|
109
|
+
# v2.2.0
|
20
110
|
* April 14, 2018
|
21
111
|
|
22
|
-
|
112
|
+
**Implemented enhancements:**
|
23
113
|
- #523: Add Rails 5.2 support [IngusSkaistkalns]
|
24
114
|
- #504: Test against Ruby 2.5.0 [ahorek]
|
25
115
|
- #528: Test against Rails 5.2 [meganemura]
|
26
116
|
|
27
|
-
|
117
|
+
**Removed:**
|
28
118
|
- #504: Remove Rails 4.0/4.1 support [ahorek]
|
29
119
|
- #545: Stop supporting for JRuby + Rails 5.0 [meganemura]
|
30
120
|
|
31
|
-
|
121
|
+
**Fixed bugs:**
|
32
122
|
- #537: Fix PostgresqlSchemaFromSqlAdapter for newer PostgreSQL [shterrett]
|
33
123
|
- #532: Issue is reported by [aldrinmartoq]
|
34
124
|
- #519: Fix exception when main database doesn't exist [mayeco]
|
35
125
|
|
36
|
-
|
126
|
+
**Closed issues:**
|
127
|
+
|
37
128
|
- #514: Fix typo [menorval]
|
38
129
|
|
39
|
-
#
|
130
|
+
# v2.1.0
|
40
131
|
* December 15, 2017
|
41
132
|
|
42
133
|
- Add `parallel_migration_threads` configuration option for running migrations
|
@@ -48,7 +139,7 @@
|
|
48
139
|
- "Host" elevator [shrmnk]
|
49
140
|
- Enhance db:drop task to act on all tenants [kuzukuzu]
|
50
141
|
|
51
|
-
#
|
142
|
+
# v2.0.0
|
52
143
|
* July 26, 2017
|
53
144
|
|
54
145
|
- Raise FileNotFound rather than abort when loading files [meganemura]
|
@@ -66,30 +157,30 @@
|
|
66
157
|
- Skip initialization for assets:clean and assets:precompile tasks
|
67
158
|
[frank-west-iii]
|
68
159
|
|
69
|
-
#
|
160
|
+
# v1.2.0
|
70
161
|
* July 28, 2016
|
71
162
|
|
72
163
|
- Official Rails 5 support
|
73
164
|
|
74
|
-
#
|
165
|
+
# v1.1.0
|
75
166
|
* May 26, 2016
|
76
167
|
|
77
168
|
- Reset tenant after each request
|
78
169
|
- [Support callbacks](https://github.com/influitive/apartment/commit/ff9c9d092a781026502f5997c0bbedcb5748bc83) on switch [cbeer]
|
79
170
|
- Preliminary support for [separate database hosts](https://github.com/influitive/apartment/commit/abdffbf8cd9fba87243f16c86390da13e318ee1f) [apneadiving]
|
80
171
|
|
81
|
-
#
|
172
|
+
# v1.0.2
|
82
173
|
* July 2, 2015
|
83
174
|
|
84
175
|
- Fix pg_dump env vars - pull/208 [MitinPavel]
|
85
176
|
- Allow custom seed data file - pull/234 [typeoneerror]
|
86
177
|
|
87
|
-
#
|
178
|
+
# v1.0.1
|
88
179
|
* April 28, 2015
|
89
180
|
|
90
181
|
- Fix `Apartment::Deprecation` which was rescuing all exceptions
|
91
182
|
|
92
|
-
#
|
183
|
+
# v1.0.0
|
93
184
|
* Feb 3, 2015
|
94
185
|
|
95
186
|
- [BREAKING CHANGE] `Apartment::Tenant.process` is deprecated in favour of `Apartment::Tenant.switch`
|
@@ -97,27 +188,27 @@
|
|
97
188
|
- Raise proper `TenantNotFound`, `TenantExists` exceptions
|
98
189
|
- Deprecate old `SchemaNotFound`, `DatabaseNotFound` exceptions
|
99
190
|
|
100
|
-
#
|
191
|
+
# v0.26.1
|
101
192
|
* Jan 13, 2015
|
102
193
|
|
103
194
|
- Fixed [schema quoting bug](https://github.com/influitive/apartment/issues/198#issuecomment-69782651) [jonsgreen]
|
104
195
|
|
105
|
-
#
|
196
|
+
# v0.26.0
|
106
197
|
* Jan 5, 2015
|
107
198
|
|
108
199
|
- Rails 4.2 support
|
109
200
|
|
110
|
-
#
|
201
|
+
# v0.25.2
|
111
202
|
* Sept 8, 2014
|
112
203
|
|
113
204
|
- Heroku fix on `assets:precompile` - pull/169 [rabbitt]
|
114
205
|
|
115
|
-
#
|
206
|
+
# v0.25.1
|
116
207
|
* July 17, 2014
|
117
208
|
|
118
209
|
- Fixed a few vestiges of Apartment::Database
|
119
210
|
|
120
|
-
#
|
211
|
+
# v0.25.0
|
121
212
|
* July 3, 2014
|
122
213
|
|
123
214
|
- [BREAKING CHANGE] - `Apartment::Database` is not deprecated in favour of
|
@@ -125,23 +216,23 @@
|
|
125
216
|
- ActiveRecord (and Rails) 4.1 now supported
|
126
217
|
- A new sql based adapter that dumps the schema using sql
|
127
218
|
|
128
|
-
#
|
219
|
+
# v0.24.3
|
129
220
|
* March 5, 2014
|
130
221
|
|
131
222
|
- Rake enhancements weren't removed from the generator template
|
132
223
|
|
133
|
-
#
|
224
|
+
# v0.24.2
|
134
225
|
* February 24, 2014
|
135
226
|
|
136
227
|
- Better warnings if `apartment:migrate` is run
|
137
228
|
|
138
|
-
#
|
229
|
+
# v0.24.1
|
139
230
|
* February 21, 2014
|
140
231
|
|
141
232
|
- requiring `apartment/tasks/enhancements` in an initializer doesn't work
|
142
233
|
- One can disable tenant migrations using `Apartment.db_migrate_tenants = false` in the Rakefile
|
143
234
|
|
144
|
-
#
|
235
|
+
# v0.24
|
145
236
|
* February 21, 2014 (In honour of the Women's Gold Medal in Hockey at Sochi)
|
146
237
|
|
147
238
|
- [BREAKING CHANGE] `apartment:migrate` task no longer depends on `db:migrate`
|
@@ -152,31 +243,31 @@
|
|
152
243
|
- This is an ongoing effort to completely replace 'database' with 'tenant' as a better abstraction
|
153
244
|
- Note the obvious `Apartment::Database` still exists but will hopefully become `Apartment::Tenant` soon
|
154
245
|
|
155
|
-
#
|
246
|
+
# v0.23.2
|
156
247
|
* January 9, 2014
|
157
248
|
|
158
249
|
- Increased visibility of #parse_database_name warning
|
159
250
|
|
160
|
-
#
|
251
|
+
# v0.23.1
|
161
252
|
* January 8, 2014
|
162
253
|
|
163
254
|
- Schema adapters now initialize with default and persistent schemas
|
164
255
|
- Deprecated Apartment::Elevators#parse_database_name
|
165
256
|
|
166
|
-
#
|
257
|
+
# v0.23.0
|
167
258
|
* August 21, 2013
|
168
259
|
|
169
260
|
- Subdomain Elevator now allows for exclusions
|
170
261
|
- Delayed::Job has been completely removed
|
171
262
|
|
172
|
-
#
|
263
|
+
# v0.22.1
|
173
264
|
* August 21, 2013
|
174
265
|
|
175
266
|
- Fix bug where if your ruby process importing the database schema is run
|
176
267
|
from a directory other than the app root, Apartment wouldn't know what
|
177
268
|
schema_migrations to insert into the database (Rails only)
|
178
269
|
|
179
|
-
#
|
270
|
+
# v0.22.0
|
180
271
|
* June 9, 2013
|
181
272
|
|
182
273
|
- Numerous bug fixes:
|
@@ -187,42 +278,42 @@
|
|
187
278
|
- Official Sidekiq support with the [apartment-sidekiq gem](https://github.com/influitive/apartment-sidekiq)
|
188
279
|
|
189
280
|
|
190
|
-
#
|
281
|
+
# v0.21.1
|
191
282
|
* May 31, 2013
|
192
283
|
|
193
284
|
- Clearing the AR::QueryCache after switching databases.
|
194
285
|
- Fixes issue with stale model being loaded for schema adapters
|
195
286
|
|
196
|
-
#
|
287
|
+
# v0.21.0
|
197
288
|
* April 24, 2013
|
198
289
|
|
199
290
|
- JDBC support!! [PetrolMan]
|
200
291
|
|
201
|
-
#
|
292
|
+
# v0.20.0
|
202
293
|
* Feb 6, 2013
|
203
294
|
|
204
295
|
- Mysql now has a 'schema like' option to perform like Postgresql (default)
|
205
296
|
- This should be significantly more performant than using connections
|
206
297
|
- Psych is now supported for Delayed::Job yaml parsing
|
207
298
|
|
208
|
-
#
|
299
|
+
# v0.19.2
|
209
300
|
* Jan 30, 2013
|
210
301
|
|
211
302
|
- Database schema file can now be set manually or skipped altogether
|
212
303
|
|
213
|
-
#
|
304
|
+
# v0.19.1
|
214
305
|
* Jan 30, 2013
|
215
306
|
|
216
307
|
- Allow schema.rb import file to be specified in config or skip schema.rb import altogether
|
217
308
|
|
218
|
-
#
|
309
|
+
# v0.19.0
|
219
310
|
* Dec 29, 2012
|
220
311
|
|
221
312
|
- Apartment is now threadsafe
|
222
313
|
- New postgis adapter [zonpantli]
|
223
314
|
- Removed ActionDispatch dependency for use with Rack apps (regression)
|
224
315
|
|
225
|
-
#
|
316
|
+
# v0.18.0
|
226
317
|
* Nov 27, 2012
|
227
318
|
|
228
319
|
- Added `append_environment` config option [virtualstaticvoid]
|
@@ -230,19 +321,19 @@
|
|
230
321
|
- Added `connection_class` config option [smashtank]
|
231
322
|
- Fixed a [bug](https://github.com/influitive/apartment/issues/17#issuecomment-10758327) in pg adapter when missing schema
|
232
323
|
|
233
|
-
#
|
324
|
+
# v0.17.1
|
234
325
|
* Oct 30, 2012
|
235
326
|
|
236
327
|
- Fixed a bug where switching to an unknown db in mysql2 would crash the app [Frodotus]
|
237
328
|
|
238
|
-
#
|
329
|
+
# v0.17.0
|
239
330
|
* Sept 26, 2012
|
240
331
|
|
241
332
|
- Apartment has [a new home!](https://github.com/influitive/apartment)
|
242
333
|
- Support Sidekiq hooks to switch dbs [maedhr]
|
243
334
|
- Allow VERSION to be used on apartment:migrate [Bhavin Kamani]
|
244
335
|
|
245
|
-
#
|
336
|
+
# v0.16.0
|
246
337
|
* June 1, 2012
|
247
338
|
|
248
339
|
- Apartment now supports a default_schema to be set, rather than relying on ActiveRecord's default schema_search_path
|
@@ -251,50 +342,50 @@
|
|
251
342
|
- There is now a full domain based elevator to switch dbs based on the whole domain [lcowell]
|
252
343
|
- There is now a generic elevator that takes a Proc to switch dbs based on the return value of that proc.
|
253
344
|
|
254
|
-
#
|
345
|
+
# v0.15.0
|
255
346
|
* March 18, 2012
|
256
347
|
|
257
348
|
- Remove Rails dependency, Apartment can now be used with any Rack based framework using ActiveRecord
|
258
349
|
|
259
|
-
#
|
350
|
+
# v0.14.4
|
260
351
|
* March 8, 2012
|
261
352
|
|
262
353
|
- Delayed::Job Hooks now return to the previous database, rather than resetting
|
263
354
|
|
264
|
-
#
|
355
|
+
# v0.14.3
|
265
356
|
* Feb 21, 2012
|
266
357
|
|
267
358
|
- Fix yaml serialization of non DJ models
|
268
359
|
|
269
|
-
#
|
360
|
+
# v0.14.2
|
270
361
|
* Feb 21, 2012
|
271
362
|
|
272
363
|
- Fix Delayed::Job yaml encoding with Rails > 3.0.x
|
273
364
|
|
274
|
-
#
|
365
|
+
# v0.14.1
|
275
366
|
* Dec 13, 2011
|
276
367
|
|
277
368
|
- Fix ActionDispatch::Callbacks deprecation warnings
|
278
369
|
|
279
|
-
#
|
370
|
+
# v0.14.0
|
280
371
|
* Dec 13, 2011
|
281
372
|
|
282
373
|
- Rails 3.1 Support
|
283
374
|
|
284
|
-
#
|
375
|
+
# v0.13.1
|
285
376
|
* Nov 8, 2011
|
286
377
|
|
287
378
|
- Reset prepared statement cache for rails 3.1.1 before switching dbs when using postgresql schemas
|
288
379
|
- Only necessary until the next release which will be more schema aware
|
289
380
|
|
290
|
-
#
|
381
|
+
# v0.13.0
|
291
382
|
* Oct 25, 2011
|
292
383
|
|
293
384
|
- `process` will now rescue with reset if the previous schema/db is no longer available
|
294
385
|
- `create` now takes an optional block which allows you to process within the newly created db
|
295
386
|
- 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
|
296
387
|
|
297
|
-
#
|
388
|
+
# v0.12.0
|
298
389
|
* Oct 4, 2011
|
299
390
|
|
300
391
|
- Added a `drop` method for removing databases/schemas
|
@@ -302,7 +393,7 @@
|
|
302
393
|
- Excluded models now take string references so they are properly reloaded in development
|
303
394
|
- Better silencing of `schema.rb` loading using `verbose` flag
|
304
395
|
|
305
|
-
#
|
396
|
+
# v0.11.1
|
306
397
|
* Sep 22, 2011
|
307
398
|
|
308
399
|
- Better use of Railties for initializing apartment
|
@@ -310,88 +401,88 @@
|
|
310
401
|
- Added reloader middleware in development to init Apartment on each request
|
311
402
|
- Override `reload!` in console to also init Apartment
|
312
403
|
|
313
|
-
#
|
404
|
+
# v0.11.0
|
314
405
|
* Sep 20, 2011
|
315
406
|
|
316
407
|
- Excluded models no longer use a different connection when using postgresql schemas. Instead their table_name is prefixed with `public.`
|
317
408
|
|
318
|
-
#
|
409
|
+
# v0.10.3
|
319
410
|
* Sep 20, 2011
|
320
411
|
|
321
412
|
- Fix improper raising of exceptions on create and reset
|
322
413
|
|
323
|
-
#
|
414
|
+
# v0.10.2
|
324
415
|
* Sep 15, 2011
|
325
416
|
|
326
417
|
- Remove all the annoying logging for loading db schema and seeding on create
|
327
418
|
|
328
|
-
#
|
419
|
+
# v0.10.1
|
329
420
|
* Aug 11, 2011
|
330
421
|
|
331
422
|
- Fixed bug in DJ where new objects (that hadn't been pulled from the db) didn't have the proper database assigned
|
332
423
|
|
333
|
-
#
|
424
|
+
# v0.10.0
|
334
425
|
* July 29, 2011
|
335
426
|
|
336
427
|
- Added better support for Delayed Job
|
337
428
|
- New config option that enables Delayed Job wrappers
|
338
429
|
- 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
|
339
430
|
|
340
|
-
#
|
431
|
+
# v0.9.2
|
341
432
|
* July 4, 2011
|
342
433
|
|
343
434
|
- Migrations now run associated rails migration fully, fixes schema.rb not being reloaded after migrations
|
344
435
|
|
345
|
-
#
|
436
|
+
# v0.9.1
|
346
437
|
* June 24, 2011
|
347
438
|
|
348
439
|
- Hooks now take the payload object as an argument to fetch the proper db for DJ hooks
|
349
440
|
|
350
|
-
#
|
441
|
+
# v0.9.0
|
351
442
|
* June 23, 2011
|
352
443
|
|
353
444
|
- Added module to provide delayed job hooks
|
354
445
|
|
355
|
-
#
|
446
|
+
# v0.8.0
|
356
447
|
* June 23, 2011
|
357
448
|
|
358
449
|
- Added #current_database which will return the current database (or schema) name
|
359
450
|
|
360
|
-
#
|
451
|
+
# v0.7.0
|
361
452
|
* June 22, 2011
|
362
453
|
|
363
454
|
- Added apartment:seed rake task for seeding all dbs
|
364
455
|
|
365
|
-
#
|
456
|
+
# v0.6.0
|
366
457
|
* June 21, 2011
|
367
458
|
|
368
459
|
- Added #process to connect to new db, perform operations, then ensure a reset
|
369
460
|
|
370
|
-
#
|
461
|
+
# v0.5.1
|
371
462
|
* June 21, 2011
|
372
463
|
|
373
464
|
- Fixed db migrate up/down/rollback
|
374
465
|
- added db:redo
|
375
466
|
|
376
|
-
#
|
467
|
+
# v0.5.0
|
377
468
|
* June 20, 2011
|
378
469
|
|
379
470
|
- Added the concept of an "Elevator", a rack based strategy for db switching
|
380
471
|
- Added the Subdomain Elevator middleware to enabled db switching based on subdomain
|
381
472
|
|
382
|
-
#
|
473
|
+
# v0.4.0
|
383
474
|
* June 14, 2011
|
384
475
|
|
385
476
|
- Added `configure` method on Apartment instead of using yml file, allows for dynamic setting of db names to migrate for rake task
|
386
477
|
- Added `seed_after_create` config option to import seed data to new db on create
|
387
478
|
|
388
|
-
#
|
479
|
+
# v0.3.0
|
389
480
|
* June 10, 2011
|
390
481
|
|
391
482
|
- Added full support for database migration
|
392
483
|
- Added in method to establish new connection for excluded models on startup rather than on each switch
|
393
484
|
|
394
|
-
#
|
485
|
+
# v0.2.0
|
395
486
|
* June 6, 2011 *
|
396
487
|
|
397
488
|
- Refactor to use more rails/active_support functionality
|
@@ -399,7 +490,7 @@
|
|
399
490
|
- Remove OStruct and just use hashes for fetching methods
|
400
491
|
- Added schema load on create instead of migrating from scratch
|
401
492
|
|
402
|
-
#
|
493
|
+
# v0.1.3
|
403
494
|
* March 30, 2011 *
|
404
495
|
|
405
496
|
- Original pass from Ryan
|