db: add User has one AdminRole relation

This commit is contained in:
Matthew Penner 2021-01-19 18:51:29 -07:00
parent 1e61fd161c
commit e01d859b53
5 changed files with 16 additions and 8 deletions

View file

@ -14,7 +14,7 @@ class CreateAdminRolesTable extends Migration
public function up()
{
Schema::create('admin_roles', function (Blueprint $table) {
$table->integer('id')->unsigned();
$table->increments('id');
$table->string('name', 64);
$table->string('description', 255)->nullable();
$table->integer('sort_id');

View file

@ -29,7 +29,6 @@ class AddAdminRoleIdColumnToUsersTable extends Migration
{
Schema::table('users', function (Blueprint $table) {
$table->dropForeign(['admin_role_id']);
$table->dropIndex('admin_role_id');
$table->dropColumn('admin_role_id');
});
}