mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 17:04:03 +00:00
wip
This commit is contained in:
parent
401212bd6c
commit
03f233b975
3 changed files with 7 additions and 3 deletions
|
|
@ -12,6 +12,7 @@ class Tenant extends Model implements TenantModel
|
|||
protected $guarded = [];
|
||||
protected $primaryKey = 'uuid';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Decoded data from the data column.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class CreateTenantsTable extends Migration
|
|||
Schema::create('tenants', function (Blueprint $table) {
|
||||
$table->string('uuid', 36)->primary();
|
||||
$table->string('domain', 255)->index();
|
||||
$table->string('data', 1024);
|
||||
$table->string('data', 1024)->default('{}');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -22,7 +22,10 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
|||
|
||||
Redis::connection('tenancy')->flushdb();
|
||||
Redis::connection('cache')->flushdb();
|
||||
Artisan::call('migrate'); // todo load default migration
|
||||
|
||||
Artisan::call('migrate:fresh');
|
||||
$this->loadLaravelMigrations();
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../src/assets/migrations');
|
||||
|
||||
if ($this->autoCreateTenant) {
|
||||
$this->createTenant();
|
||||
|
|
@ -95,7 +98,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
|||
'tenancy.storage_driver' => DatabaseStorageDriver::class,
|
||||
]);
|
||||
tenancy()->setStorageDriver(DatabaseStorageDriver::class);
|
||||
|
||||
|
||||
break;
|
||||
case '2':
|
||||
$app['config']->set([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue