w0bm.com v1.5z FULL.RETARD.BUILD.BUT.STILL.WORKS

This commit is contained in:
noxy
2019-08-26 16:58:26 +00:00
commit da71b95aa2
517 changed files with 143236 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddIcons extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('icons', function(Blueprint $table) {
$table->increments('id');
$table->string('icon', 255);
$table->string('icon_type', 255);
});
Schema::table('users', function(Blueprint $table) {
$table->unsignedInteger('icon_id')->index()->nullable();
$table->foreign('icon_id')
->references('id')
->on('icons')
->onDelete('cascade');
});
Schema::table('roles', function(Blueprint $table) {
$table->unsignedInteger('icon_id')->index()->nullable();
$table->foreign('icon_id')
->references('id')
->on('icons')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('icons');
Schema::table('users', function(Blueprint $table) {
$table->dropColumn('icon_id');
});
Schema::table('roles', function(Blueprint $table) {
$table->dropColumn('icon_id');
});
}
}