Skip to content

Commit

Permalink
fix db file
Browse files Browse the repository at this point in the history
  • Loading branch information
xxl4 committed Sep 6, 2024
1 parent a5c7c2d commit ab7e162
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class CreateRulesTable extends Migration
*/
public function up()
{
$connection = config('lauthz.basic.database.connection') ?: config('database.default');
Schema::connection($connection)->create(config('lauthz.basic.database.rules_table'), function (Blueprint $table) {

Schema::create('rules', function (Blueprint $table) {
$table->increments('id');
$table->string('ptype')->nullable();
$table->string('v0')->nullable();
Expand All @@ -21,9 +21,8 @@ public function up()
$table->string('v3')->nullable();
$table->string('v4')->nullable();
$table->string('v5')->nullable();
// $table->timestamps();
$table->dateTime('created_at')->nullable();
$table->dateTime('updated_at')->nullable();
$table->timestamps();

});
}

Expand All @@ -32,7 +31,7 @@ public function up()
*/
public function down()
{
$connection = config('lauthz.basic.database.connection') ?: config('database.default');
Schema::connection($connection)->dropIfExists(config('lauthz.basic.database.rules_table'));

Schema::dropIfExists('rules');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public function up()
{
Schema::create('permissions', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->string('path')->nullable();
$table->string('title')->comment('permission title');
$table->string('path')->comment('permission path')->nullable();
$table->string('name')->nullable();
$table->string('redirect')->nullable();
$table->string('icon')->nullable();
Expand All @@ -29,8 +29,7 @@ public function up()
$table->unsignedTinyInteger('sort')->default(0);
$table->unsignedTinyInteger('type')->default(0);
$table->unsignedTinyInteger('status')->default(1);
$table->dateTime('created_at')->nullable();
$table->dateTime('updated_at')->nullable();
$table->timestamps();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public function up()
$table->string('value')->unique();
$table->string('desc')->nullable();
$table->unsignedTinyInteger('status')->default(1);
$table->dateTime('created_at')->nullable();
$table->dateTime('updated_at')->nullable();
$table->timestamps();
});
}

Expand Down

0 comments on commit ab7e162

Please sign in to comment.