db: add User has one AdminRole relation
This commit is contained in:
parent
1e61fd161c
commit
e01d859b53
5 changed files with 16 additions and 8 deletions
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue