mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 14:54:03 +00:00
ability to publish migrations
This commit is contained in:
parent
b08961150c
commit
cd24aa779d
2 changed files with 29 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateTenantResourcesTable extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('tenant_resources', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('tenant_id');
|
||||||
|
$table->string('resource_global_id');
|
||||||
|
$table->string('tenant_resources_type');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('tenant_resources');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -109,6 +109,10 @@ class TenancyServiceProvider extends ServiceProvider
|
||||||
__DIR__ . '/../assets/impersonation-migrations/' => database_path('migrations'),
|
__DIR__ . '/../assets/impersonation-migrations/' => database_path('migrations'),
|
||||||
], 'impersonation-migrations');
|
], 'impersonation-migrations');
|
||||||
|
|
||||||
|
$this->publishes([
|
||||||
|
__DIR__ . '/../assets/resource-syncing-migrations/' => database_path('migrations'),
|
||||||
|
], 'resource-syncing-migrations');
|
||||||
|
|
||||||
$this->publishes([
|
$this->publishes([
|
||||||
__DIR__ . '/../assets/tenant_routes.stub.php' => base_path('routes/tenant.php'),
|
__DIR__ . '/../assets/tenant_routes.stub.php' => base_path('routes/tenant.php'),
|
||||||
], 'routes');
|
], 'routes');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue