PHP CS Fixer
db4a795c3e
Fix code style (php-cs-fixer)
2022-08-04 18:30:06 +00:00
Abrar Ahmad
a45aa8e274
Improve tenants:run command ( #912 )
...
* improve `tenants:run` command
* Update Run.php
2022-08-04 20:29:39 +02:00
Abrar Ahmad
97ab483173
Completing PR #881 ( #902 )
...
* install PHP CS Fixer
* Fix styling
* remove StyleCI config
* use config from archtechx/template
* Fix styling
* added `php-cs-fixer`
* Update .php-cs-fixer.php
* added GitHub token
* Update ci.yml
* Update ci.yml
* Update ci.yml
* php-cs-fixer workflow same as template
Co-authored-by: Erik Gaal <me@erikgaal.nl>
Co-authored-by: erikgaal <erikgaal@users.noreply.github.com>
2022-07-20 15:28:45 +02:00
Victor R
7d98ebb5d1
[4.x] Add tenant schema dump command ( #807 )
...
* Add tenant dump command
* Register tenant schema dump command
* Added tests for tenant schema dump command
* remove docblocks, fix tenant() logic
* trigger ci
* Install mysql-client
* mysql-client -> mariadb-client
* add tenant-schema-test.dump to .gitignore
Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2022-06-01 16:12:59 +02:00
Samuel Štancl
349125c02e
Merge hotfix branch ( #834 )
...
* try specifying the signature in __construct
* constructor doesn't work since Reflection is used, try specifying getDefaultName() instead
* Fixed: make migration commands compatible
* Fix failing tests
* Fix username generation
* Re-create tmp dir as well if needed
* wip
2022-03-30 18:00:55 +02:00
masiorama
b4a4eab949
Add drop of db views on migrate fresh command ( #812 )
...
* Optionally handle drop of table views on MigrateFresh
@stancl I managed to make the modification discussed here #811
Afaik (and I can understand) this is the easiest way to handle it, but I'm open to discuss.
* Remove redundant store variable
* code style
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2022-02-22 16:26:07 +01:00
Jori Stein
f08e33afd8
Remove redondant initialization ( #775 )
2022-01-06 21:35:56 +01:00
sort72
08bfd6f9bb
Use tenant key on console commands instead of id ( #768 )
2021-12-25 15:24:34 +01:00
Michael Lundbøl
27e9fb4a69
Fix arguments being initialized twice for tenants:seed command ( #611 )
2021-03-10 12:08:51 +01:00
Pete Cooper
dd1b7fc86d
Fix tenants:list when not using multi-domain tenancy ( #504 )
...
* Fix tenants:list when not using multi-domain tenancy
* formatting
* update to an if/else
2020-11-12 17:23:58 +01:00
Dylan Harbour
e0af2e9945
Fix issue 521: Array input for --tenants ( #522 )
...
* Fix issue 521: Array input for `--tenants`
Tenancy for Laravel docs refer to using multiple `--tenants=<...> ` options when running a command for multiple tenants explicitly: https://tenancyforlaravel.com/docs/v3/console-commands
However, the command input is not defined correctly to receive arrays.
https://laravel.com/docs/7.x/artisan#input-arrays
This PR adds a failing test, fixes the issue and corrects a typo in the contributing readme.
* Styleci
Co-authored-by: Dylan Harbour <dylanh@ringier.co.za>
2020-11-12 14:08:37 +01:00
Andre Sayej
36aabb7883
First try at Laravel 8 ( #491 )
2020-09-08 21:11:56 +02:00
Samuel Štancl
579779b88b
Move DatabaseManager
2020-05-30 15:38:29 +02:00
Samuel Štancl
43d75cdd38
Fix tenants:list
2020-05-29 09:33:49 +02:00
Samuel Štancl
5eeba43796
Move tenant routes file
2020-05-24 21:10:50 +02:00
Samuel Štancl
78c64f0425
Rolling back & deleting DB events
2020-05-24 20:52:50 +02:00
stancl
6955512a6b
Apply fixes from StyleCI
2020-05-22 09:01:31 +00:00
Samuel Štancl
33d6fd82da
-ing event behavior
2020-05-21 17:55:48 +02:00
Samuel Štancl
4f8d892481
Remove obsolete files, restructure
2020-05-21 15:54:35 +02:00
Samuel Štancl
ac58f6992b
Use getTenantKey() instead of ->id references
2020-05-20 20:41:47 +02:00
Samuel Štancl
0508429e0f
Fix asset publishing
2020-05-17 15:14:05 +02:00
Samuel Štancl
de53b81c0e
Change default tenant model, write more tests, cleanup
2020-05-13 06:23:41 +02:00
Samuel Štancl
c32f229dd5
Refactor more old code and get tests to pass
2020-05-13 04:51:37 +02:00
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