Răsfoiți Sursa

Add new media migration

Daniel Supernault 7 ani în urmă
părinte
comite
5cb3e5c17b

+ 34 - 0
database/migrations/2018_06_11_030049_add_filters_to_media_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddFiltersToMediaTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('media', function (Blueprint $table) {
+            $table->string('filter_name')->nullable()->after('orientation');
+            $table->string('filter_class')->nullable()->after('filter_name');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('media', function (Blueprint $table) {
+            $table->dropColumn('filter_name');
+            $table->dropColumn('filter_class');
+        });
+    }
+}