1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 22:14:03 +00:00
Commit graph

49 commits

Author SHA1 Message Date
Samuel Štancl
89936187ce Rewrite old tests 2020-05-12 23:22:40 +02:00
Samuel Štancl
3c4d2189dc DatabasePreparationTest 2020-05-12 03:14:08 +02:00
Samuel Štancl
6f4b9f486c Bootstrapper tests 2020-05-11 03:37:47 +02:00
Samuel Štancl
bd9aad229b vague first draft of v3. TenantModelTest is passing 2020-05-08 04:37:43 +02:00
Samuel Štancl
3bb2759fe2
[3.x] DB users (#382)
* Initial draft

* Apply fixes from StyleCI

* Use CI on master branch too

* Pass correct argument to queued DB creators/deleters

* Apply fixes from StyleCI

* Remove new interface from MySQLDBManager

* Make phpunit run

* Apply fixes from StyleCI

* Fix static property

* Default databaseName

* Use database transactions for creating users & granting permissions

* Apply fixes from StyleCI

* Get old tests to pass

* Apply fixes from StyleCI

* Add tests for PermissionControlledMySQLDatabaseManager

* Apply fixes from StyleCI

* Write test for extra config, fix bug with extra config

* Apply fixes from StyleCI
2020-05-03 18:12:27 +02:00
Samuel Štancl
e363456497
Fix #367, make seeder respect --force (#368) 2020-04-23 20:20:54 +02:00
Samuel Štancl
61785128a8 Don't override CLI params in tenants:seed (fixes #329) 2020-03-24 15:14:20 +01:00
Samuel Štancl
30bab68b6a
Laravel 7 support (#304)
* Laravel 7 support

* Remove language from travis.yml

* Fix travis.yml

* Consistent indentation in travis.yml

* Use dev-master for phpcov

* Cleanup

* switch up envs

* verify both laravel versions are used

* 6 -> 7

* Fix travis yml

* Use stable phpcov

* Different installation for Laravel 7

* Indentation

* Fix dockerfile

* Fix indentation

* Fix tests

* Remove fail() calls
2020-03-17 18:47:24 +01:00
Samuel Štancl
526f0826a4
Use seeder params in tenants:seed instead of just the automatic seeder (#317)
* Use seeder params in tenants:seed instead of just the automatic seeder

* Left trim - from option names

* Use no seeder params for tests
2020-03-17 15:59:45 +01:00
Samuel Štancl
d0bd8f2ad8
Force migrate when running MigrateFresh 2020-03-10 21:33:25 +01:00
Samuel Štancl
6ad1a6639f
Set $persisted in TenantManager::createTenant() (#272)
* Set $persisted in TenantManager::createTenant()

* Apply fixes from StyleCI
2020-01-19 12:08:16 +01:00
Samuel Štancl
7389f44de9
[2.2.0] Use Tenant Run in console commands (#205)
* Utilize Tenant Run in commands

* Apply fixes from StyleCI
2019-10-27 20:50:49 +01:00
Samuel Štancl
c8a0a58df6
Create routes/tenant.php only if the file does not exist (#188)
* Create routes/tenant.php only if the file does not exist

* Move tenant routes to a stub file
2019-10-19 22:03:03 +02:00
Samuel Štancl
cbd3850a8f
[2.1.0] Initialize tenancy before executing controller constructors (#169)
* Update message about migrations in Install

* wip

* Apply fixes from StyleCI

* string instead of array

* Fix globalUrl binding

* Simplify if condition in TenantRouteServiceProvider

* Apply fixes from StyleCI

* Improve PreventAccessFromTenantDomains - look into middleware subgroups

* Fix typo

* gatherMiddleware() instead of middleware()

* Fix tests

* Apply fixes from StyleCI

* Update install command

* Apply fixes from StyleCI

* Add the PreventAccess MW to tenant routes by default
2019-10-15 20:23:56 +02:00
Chris Brown
cc74e9f3ca Add migration reminder to install command (#159) 2019-10-09 19:50:09 +02:00
Samuel Štancl
f77a929113 getDatabaseName() -> getConnectionName() 2019-10-04 21:31:21 +02:00
Samuel Štancl
709e295048 Use correct DB connection in seed command 2019-10-04 21:23:06 +02:00
Samuel Štancl
ede2dc23c6 Use correct DB connections in Migrate, Rollback & Seed commands 2019-10-04 21:22:47 +02:00
Samuel Štancl
d4472469f0
[2.x] Add CreateTenant command (#153)
* Add CreateTenant command, fix TenantList output

* Create command test
2019-10-04 20:22:23 +02:00
Samuel Štancl
d0b1729258
[2.x] Migrate fresh (#148)
* Remove comment

* migrate-fresh first draft

* Final

* DB name -> DB connection

* Add array_filter for consistency with Laravel

* Add test for migrate-fresh

* Apply fixes from StyleCI
2019-09-30 17:01:01 +02:00
Samuel Štancl
50cf677034 Remove comment 2019-09-29 12:01:40 +02:00
Samuel Štancl
553b162930 Clean endTenancy() calls at the end of commands 2019-09-27 22:57:10 +02:00
Anton Komarev
5b154d1834 Fix default tenant route (#132) 2019-09-26 06:25:07 +02:00
Samuel Štancl
6134c8113b asset() tenancy 2019-09-21 16:06:08 +02:00
Samuel Štancl
74aead2a60 Add test for tenancy.database.based_on null 2019-09-21 14:06:42 +02:00
Samuel Štancl
c475e7a43d Fix transactions 2019-09-21 13:54:02 +02:00
Samuel Štancl
cd53ff120d Fix tests 2019-09-21 12:04:25 +02:00
Samuel Štancl
c9903cd43c Clean up 2019-09-19 20:32:09 +02:00
Samuel Štancl
8565cc7acc Get multiple envs (redis/db) to run correctly 2019-09-17 19:39:57 +02:00
Samuel Štancl
1532ccf019 Fix some tests 2019-09-16 16:57:55 +02:00
Samuel Štancl
79f912384b uuid -> id (references in code) 2019-09-15 22:52:31 +02:00
Samuel Štancl
1bfe4a7ea5
Apply fixes from StyleCI (#126) 2019-09-11 17:37:02 +02:00
Samuel Štancl
04b4e0644f WIP DatabaseManager 2019-09-08 13:46:07 +02:00
Samuel Štancl
41d8bb7e09 DatabaseManager WIP 2019-09-05 19:26:29 +02:00
Samuel Štancl
0a57f9d3df
[1.8.0] Allow conflicting routes (#114)
* PreventAccessFromTenantDomains middleware

* Apply fixes from StyleCI

* Install command

* Switch order of middleware

* Apply middleware to $middleware instead of web, fix tests

* Apply fixes from StyleCI

* Fix tests

* Fix tests

* wip

* wip
2019-08-23 22:24:31 +02:00
Samuel Štancl
2fd3662eb7
[1.8.0] Use strict types (#115)
* Use strict types

* Apply fixes from StyleCI

* Fix str_repeat

* Fix false json decode
2019-08-23 18:18:26 +02:00
stancl
29c8d5dab4 Apply fixes from StyleCI 2019-08-17 14:33:59 +00:00
Samuel Štancl
760817529e Merge branch '1.x' of github.com:stancl/tenancy into 1.x 2019-08-17 16:33:49 +02:00
Samuel Štancl
47fb158b59 Use MySQL by default; create migrations/tenant in tenancy:install 2019-08-17 16:33:22 +02:00
stancl
fd66537e7f Apply fixes from StyleCI 2019-08-17 13:25:48 +00:00
Samuel Štancl
be077ae73c Add the option to specify connection in DatabaseManager 2019-08-17 15:25:39 +02:00
stancl
84890cdd1e Apply fixes from StyleCI 2019-08-16 16:21:59 +00:00
Samuel Štancl
674f4b3f9a
[1.7.0] Install command (#95) 2019-08-15 19:16:25 +02:00
Samuel Štancl
15f09e59df
[1.7.0] Add tenants:run (#81)
* wip

* Apply fixes from StyleCI

* first implementation

* Apply fixes from StyleCI

* Add support for arguments and options

* Apply fixes from StyleCI

* Write docs, add support for = in arg/opt value

* Apply fixes from StyleCI

* add $ [ci skip]
2019-08-09 19:06:00 +02:00
Samuel Štancl
eceacd9422
Apply fixes from StyleCI (#80) 2019-08-02 20:01:10 +02:00
Samuel Štancl
a3f37b7f77 Fix #71 2019-07-25 23:26:36 +02:00
Samuel Štancl
e1def355f9 Add command tests 2019-02-09 11:53:48 +01:00
Samuel Štancl
33fcb8a936 Cleanup commands 2019-02-09 00:40:52 +01:00
Samuel Štancl
deb3ad77f5 Initial commit 2019-01-17 22:24:12 +01:00