/**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('nodes', function (Blueprint $table) {
         $table->increments('id');
         $table->integer('node_type_id')->unsigned();
         $table->integer('user_id')->unsigned();
         NestedSet::columns($table);
         $table->boolean('mailing')->default(0);
         $table->boolean('visible')->default(1);
         $table->boolean('sterile')->default(0);
         $table->boolean('home')->default(0);
         $table->boolean('locked')->default(0);
         $table->integer('status')->default(30);
         $table->boolean('hides_children')->default(0);
         $table->double('priority')->unsigned()->default(1);
         $table->timestamp('published_at')->nullable();
         $table->string('children_order')->default('_lft');
         $table->string('children_order_direction', 4)->default('asc');
         $table->enum('children_display_mode', ['tree', 'list'])->default('list');
         $table->timestamps();
         $table->index('mailing');
         $table->index('home');
         $table->index('node_type_id');
         $table->foreign('node_type_id')->references('id')->on('node_types')->onDelete('cascade');
         $table->foreign('user_id')->references('id')->on('users');
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('categories', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name');
         \Kalnoy\Nestedset\NestedSet::columns($table);
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('library_categories', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name');
         $table->timestamps();
         NestedSet::columns($table);
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('ticket_departments', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name')->comment = 'the name of the support department that should handle specific tickets';
         $table->string('description');
         NestedSet::columns($table);
         $table->timestamps();
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('categories', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name');
         $table->text('description')->nullable();
         $table->string('slug');
         NestedSet::columns($table);
         $table->timestamps();
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('categories', function (Blueprint $table) {
         $table->increments('id');
         $table->string('title');
         $table->string('description');
         $table->string('icon');
         \Kalnoy\Nestedset\NestedSet::columns($table);
         $table->timestamps();
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('article_categories', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name');
         $table->string('type');
         $table->string('keywords');
         $table->string('description');
         \Kalnoy\Nestedset\NestedSet::columns($table);
         $table->timestamps();
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('categories', function (Blueprint $table) {
         $table->increments('id');
         $table->string('title');
         $table->string('slug')->unique();
         $table->boolean('is_main')->default(0);
         $table->timestamps();
         $table->softDeletes();
         NestedSet::columns($table);
     });
 }
Example #9
0
 public static function setUpBeforeClass()
 {
     $schema = Capsule::schema();
     $schema->dropIfExists('categories');
     $schema->create('categories', function (\Illuminate\Database\Schema\Blueprint $table) {
         $table->increments('id');
         $table->string('name');
         $table->softDeletes();
         NestedSet::columns($table);
     });
     Capsule::enableQueryLog();
 }
 /**
  * Run the migrations.
  */
 public function up()
 {
     Schema::create('comments', function (Blueprint $table) {
         $table->increments('id');
         $table->string('title')->nullable();
         $table->text('body');
         $table->morphs('commentable');
         $table->morphs('creator');
         NestedSet::columns($table);
         $table->timestamps();
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('prso_categories', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name');
         $table->string('slug')->nullable();
         $table->text('desc')->nullable();
         NestedSet::columns($table);
         $table->timestamps();
         $table->index(['_lft', '_rgt', 'parent_id', 'slug']);
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('structure', function (Blueprint $table) {
         $table->increments('id');
         $table->boolean('published')->default(true);
         $table->integer('position')->unsigned();
         $table->string('alias');
         Nestedset\NestedSet::columns($table);
         $table->string('controller');
         $table->timestamps();
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('peoples', function (Blueprint $peoples) {
         $peoples->increments('id');
         $peoples->string('name', 25);
         $peoples->string('surname', 25);
         $peoples->integer('age')->unsigned();
         $peoples->enum('gender', ['male', 'female']);
         $peoples->integer('spouse')->nullable()->unsigned();
         $peoples->foreign('spouse')->references('id')->on('peoples');
         NestedSet::columns($peoples);
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('permissions', function (Blueprint $table) {
         $table->increments('id');
         NestedSet::columns($table);
         $table->string('name');
         $table->enum('type', ['directory', 'resource', 'permission'])->default('directory');
         $table->string('icon')->nullable();
         $table->string('as')->nullable();
         $table->string('uses')->nullable();
         $table->timestamps();
     });
 }
Example #15
0
 public static function setUpBeforeClass()
 {
     $schema = Capsule::schema();
     $schema->dropIfExists('menu_items');
     Capsule::disableQueryLog();
     $schema->create('menu_items', function (\Illuminate\Database\Schema\Blueprint $table) {
         $table->increments('id');
         $table->unsignedInteger('menu_id');
         $table->string('title')->nullable();
         NestedSet::columns($table);
     });
     Capsule::enableQueryLog();
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('menu__menus', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name');
         $table->string('url')->nullable();
         $table->string('attribute_target')->nullable();
         $table->string('attribute_id')->nullable();
         $table->string('attribute_class')->nullable();
         $table->boolean('active')->default(false);
         $table->boolean('useSubject')->default(false);
         $table->integer('subject_id')->nullable()->index();
         $table->string('subject_type')->nullable()->index();
         NestedSet::columns($table);
         $table->timestamps();
         $table->engine = 'InnoDB';
     });
 }
 public function up()
 {
     Schema::create('categories', function ($table) {
         $table->increments('id')->unsigned();
         NestedSet::columns($table);
         //	вместо NestedSet::columns($table); можно использовать 3 такие столбца
         //	$table->unsignedInteger('_lft');
         //	$table->unsignedInteger('_rgt');
         //	$table->tinyInteger('parent_id')->unsigned()->nullable();
         $table->tinyInteger('level')->unsigned();
         $table->string('type', 20);
         $table->string('menutype', 20);
         $table->string('title', 100);
         $table->string('sef', 50)->nullable();
         $table->string('class', 50);
         $table->text('body')->nullable();
         $table->string('image', 255)->nullable();
         $table->string('metatitle', 255)->nullable();
         $table->string('metakey', 255)->nullable();
         $table->string('metadesc', 255)->nullable();
     });
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('categories', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name', 30);
         $table->string('name_ru', 30);
         $table->softDeletes();
         NestedSet::columns($table);
     });
     Schema::create('products', function (Blueprint $table) {
         $table->increments('id');
         $table->string('model', 15)->unique();
         $table->string('article', 15)->nullable();
         $table->integer('category_id')->unsigned();
         $table->string('growth')->nullable();
         $table->string('size')->nullable();
         $table->text('description')->nullable();
         $table->boolean('new')->default(0);
         $table->boolean('published')->default(0);
         $table->string('photo')->nullable();
         $table->timestamps();
         $table->foreign('category_id')->references('id')->on('categories')->uonUpdate('cascade');
     });
 }