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