@@ -69,17 +69,21 @@ TODO:
6969 - [ ] should error if self is not an abstract base class or if target is not tenanted abstract base class
7070 - [x] ` tenant_config_name ` and ` .tenanted? `
7171 - [ ] ` .tenanted_class ` nil or the abstract base class
72- - [ ] all the creation and schema migration complications (we have existing tests for this)
73- - think about race conditions here, maybe use a file lock to figure it out
74- - running migrations (they are done in a transaction, but the second thread's migration may fail resulting in a 500?)
75- - loading schemas (if the first thread loads the schema and inserts data, can the second thread accidentally drop/load causing data loss?)
72+ - [x] shared connection pools
73+ - [x] all the creation and schema migration complications (we have existing tests for this)
74+ accidentally drop/load causing data loss?)
7675 - [ ] feature to turn off automatic creation/migration
7776 - make sure we pay attention to Rails.config.active_record.migration_error when we turn off auto-migrating
7877 - thinking
7978 - should there be a global singleton ` Tenant ` ? I'm not sure we need it or the limitations of a global.
8079 - if we do, though, then ` .tenanted ` should set ` Tenant.base_class= `
8180 - and we need to add checks that ` .tenanted ` is called only ONCE in the application
8281
82+ - [ ] think about race conditions with database creation and schema migrations
83+ - maybe use a file lock to figure it out
84+ - running migrations (they are done in a transaction, but the second thread's migration may fail resulting in a 500?)
85+ - loading schemas (if the first thread loads the schema and inserts data, can the second thread
86+
8387- database tasks
8488 - [ ] RootConfig should conditionally re-enable database tasks ... when AR_TENANT is present?
8589 - [ ] make ` db:migrate:tenants ` iterate over all the tenants on disk
0 commit comments