1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 12:44:02 +00:00

Remove timestamps

This commit is contained in:
Samuel Štancl 2019-09-29 11:59:17 +02:00
parent dcc9bda758
commit 33f5f0e316
5 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,6 @@ class CreateTenantsTable extends Migration
// (optional) your custom, indexed columns may go here
$table->json('data');
$table->timestamps();
});
}

View file

@ -18,7 +18,6 @@ class CreateDomainsTable extends Migration
Schema::create('domains', function (Blueprint $table) {
$table->string('domain', 255)->primary();
$table->string('tenant_id', 36);
$table->timestamps();
$table->foreign('tenant_id')->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade');
});

View file

@ -85,7 +85,7 @@ class DatabaseStorageDriver implements StorageDriver
$domainData = [];
foreach ($tenant->domains as $domain) {
$domainData[] = ['domain' => $domain, 'tenant_id' => $tenant->id, 'created_at' => Carbon::now()];
$domainData[] = ['domain' => $domain, 'tenant_id' => $tenant->id];
}
Domains::insert($domainData);

View file

@ -16,6 +16,7 @@ class DomainModel extends Model
protected $guarded = [];
protected $primaryKey = 'domain';
public $incrementing = false;
public $timestamps = false;
public function getTable()
{

View file

@ -16,6 +16,7 @@ class TenantModel extends Model
protected $guarded = [];
protected $primaryKey = 'id';
public $incrementing = false;
public $timestamps = false;
public function getTable()
{