1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 17:34:03 +00:00

Change string column type to UUID

This commit is contained in:
antonkomarev 2019-09-26 19:24:39 +03:00
parent ee06ff296e
commit 6a5f0acd1d
2 changed files with 8 additions and 8 deletions

View file

@ -13,10 +13,10 @@ class CreateTenantsTable extends Migration
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('tenants', function (Blueprint $table) {
$table->string('id', 36)->primary(); // 36 characters is the default uuid length
$table->uuid('id')->primary();
// (optional) your custom, indexed columns can go here
$table->json('data');
@ -28,8 +28,8 @@ class CreateTenantsTable extends Migration
*
* @return void
*/
public function down()
public function down(): void
{
Schema::drop('tenants');
Schema::dropIfExists('tenants');
}
}