From cd24aa779d33bc5b5a09508f3551da0c8107b1e9 Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Thu, 10 Nov 2022 14:37:11 +0500 Subject: [PATCH] ability to publish migrations --- ...1_000002_create_tenant_resources_table.php | 25 +++++++++++++++++++ src/TenancyServiceProvider.php | 4 +++ 2 files changed, 29 insertions(+) create mode 100644 assets/resource-syncing-migrations/2020_05_11_000002_create_tenant_resources_table.php diff --git a/assets/resource-syncing-migrations/2020_05_11_000002_create_tenant_resources_table.php b/assets/resource-syncing-migrations/2020_05_11_000002_create_tenant_resources_table.php new file mode 100644 index 00000000..83b722fa --- /dev/null +++ b/assets/resource-syncing-migrations/2020_05_11_000002_create_tenant_resources_table.php @@ -0,0 +1,25 @@ +increments('id'); + $table->string('tenant_id'); + $table->string('resource_global_id'); + $table->string('tenant_resources_type'); + }); + } + + public function down() + { + Schema::dropIfExists('tenant_resources'); + } +} diff --git a/src/TenancyServiceProvider.php b/src/TenancyServiceProvider.php index 01770cda..ca39c194 100644 --- a/src/TenancyServiceProvider.php +++ b/src/TenancyServiceProvider.php @@ -109,6 +109,10 @@ class TenancyServiceProvider extends ServiceProvider __DIR__ . '/../assets/impersonation-migrations/' => database_path('migrations'), ], 'impersonation-migrations'); + $this->publishes([ + __DIR__ . '/../assets/resource-syncing-migrations/' => database_path('migrations'), + ], 'resource-syncing-migrations'); + $this->publishes([ __DIR__ . '/../assets/tenant_routes.stub.php' => base_path('routes/tenant.php'), ], 'routes');