mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 18:04:03 +00:00
Model timestamps
This commit is contained in:
parent
4b5554dcac
commit
6b103cd2cb
6 changed files with 10 additions and 6 deletions
|
|
@ -17,9 +17,11 @@ class CreateTenantsTable extends Migration
|
|||
{
|
||||
Schema::create('tenants', function (Blueprint $table) {
|
||||
$table->string('id', 36)->primary(); // 36 characters is the default uuid length
|
||||
// (optional) your custom, indexed columns can go here
|
||||
|
||||
// (optional) your custom, indexed columns may go here
|
||||
|
||||
$table->json('data');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ 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');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue