From 15793496e8d56769c792cf39673c6e6dea3ec4d9 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 28 Jun 2018 21:15:57 +0200 Subject: Preparing for complete rewrite.. --- .../src/Database/Migrations/v400/RolesTable.php | 77 ---------------------- 1 file changed, 77 deletions(-) delete mode 100644 main/app/sprinkles/account/src/Database/Migrations/v400/RolesTable.php (limited to 'main/app/sprinkles/account/src/Database/Migrations/v400/RolesTable.php') diff --git a/main/app/sprinkles/account/src/Database/Migrations/v400/RolesTable.php b/main/app/sprinkles/account/src/Database/Migrations/v400/RolesTable.php deleted file mode 100644 index 3a524e2..0000000 --- a/main/app/sprinkles/account/src/Database/Migrations/v400/RolesTable.php +++ /dev/null @@ -1,77 +0,0 @@ -schema->hasTable('roles')) { - $this->schema->create('roles', function (Blueprint $table) { - $table->increments('id'); - $table->string('slug'); - $table->string('name'); - $table->text('description')->nullable(); - $table->timestamps(); - - $table->engine = 'InnoDB'; - $table->collation = 'utf8_unicode_ci'; - $table->charset = 'utf8'; - $table->unique('slug'); - $table->index('slug'); - }); - - // Add default roles - $roles = [ - 'user' => new Role([ - 'slug' => 'user', - 'name' => 'User', - 'description' => 'This role provides basic user functionality.' - ]), - 'site-admin' => new Role([ - 'slug' => 'site-admin', - 'name' => 'Site Administrator', - 'description' => 'This role is meant for "site administrators", who can basically do anything except create, edit, or delete other administrators.' - ]), - 'group-admin' => new Role([ - 'slug' => 'group-admin', - 'name' => 'Group Administrator', - 'description' => 'This role is meant for "group administrators", who can basically do anything with users in their own group, except other administrators of that group.' - ]) - ]; - - foreach ($roles as $slug => $role) { - $role->save(); - } - } - } - - /** - * {@inheritDoc} - */ - public function down() { - $this->schema->drop('roles'); - } -} -- cgit v1.2.3