1: <?php
2:
3: use Illuminate\Database\Schema\Blueprint;
4: use Illuminate\Database\Migrations\Migration;
5:
6: class extends Migration {
7:
8: 9: 10: 11: 12: 13:
14: public function up()
15: {
16: if (!Schema::hasTable('_db_menu_permissions'))
17: {
18: Schema::create('_db_menu_permissions', function ($table)
19: {
20: $table->increments('id');
21: $table->integer('menu_id')->unsigned();
22: $table->integer('usergroup_id')->unsigned();
23: $table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
24: $table->timestamp('updated_at')->default('0000-00-00 00:00:00');
25: });
26: }
27: }
28:
29: 30: 31: 32: 33: 34:
35: public function down()
36: {
37: Schema::dropIfExists('_db_menu_permissions');
38: }
39:
40: }
41: