1: <?php
2:
3: use Illuminate\Database\Schema\Blueprint;
4: use Illuminate\Database\Migrations\Migration;
5:
6: class CreatePageAssetsTable extends Migration {
7:
8: /**
9: * Run the migrations.
10: *
11: * @access public
12: * @return void
13: */
14: public function up()
15: {
16: if (!Schema::hasTable('_db_page_assets'))
17: {
18: Schema::create('_db_page_assets', function ($table)
19: {
20: $table->increments('id')->unique();
21: $table->integer('page_type_id'); //links to _db_option_types
22: $table->integer('asset_type_id');
23: });
24: }
25: }
26:
27: /**
28: * Reverse the migrations.
29: *
30: * @access public
31: * @return void
32: */
33: public function down()
34: {
35: Schema::dropIfExists('_db_page_assets');
36: }
37:
38: }
39: