mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 22:54:03 +00:00
Create MySQL/PostgreSQL DBs while using sqlite as the central DB driver
This commit is contained in:
parent
1e6b21cfd4
commit
eb6cba8f1a
11 changed files with 62 additions and 22 deletions
|
|
@ -16,8 +16,10 @@ class CreateDomainsTable extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::create('domains', function (Blueprint $table) {
|
||||
$table->string('tenant_id', 36); // 36 characters is the default uuid length // todo foreign key?
|
||||
$table->string('tenant_id', 36); // 36 characters is the default uuid length
|
||||
$table->string('domain', 255)->unique(); // don't change this
|
||||
|
||||
$table->foreign('tenant_id')->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue