Migration refactoring

This commit is contained in:
Peter Papp
2021-02-25 17:15:58 +01:00
parent 18518106ca
commit af1a8e6333
28 changed files with 101 additions and 581 deletions
@@ -14,14 +14,15 @@ class CreateSharesTable extends Migration
public function up()
{
Schema::create('shares', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('user_id');
$table->uuid('id')->primary();
$table->uuid('user_id');
$table->string('token', 16)->unique();
$table->bigInteger('item_id');
$table->enum('type', ['file', 'files', 'folder']);
$table->uuid('item_id');
$table->enum('type', ['file', 'folder']);
$table->enum('permission', ['visitor', 'editor'])->nullable();
$table->boolean('protected');
$table->boolean('is_protected')->default(0);
$table->string('password')->nullable();
$table->integer('expire_in')->nullable();
$table->timestamps();
});
}