From 37845e5f0441c2186ee70f9ff34b4cc184d9240c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 26 Aug 2018 19:32:12 -0600 Subject: [PATCH] Add new migration for media table --- ...004653_update_media_table_add_alt_text.php | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 database/migrations/2018_08_27_004653_update_media_table_add_alt_text.php diff --git a/database/migrations/2018_08_27_004653_update_media_table_add_alt_text.php b/database/migrations/2018_08_27_004653_update_media_table_add_alt_text.php new file mode 100644 index 000000000..2071ba3b1 --- /dev/null +++ b/database/migrations/2018_08_27_004653_update_media_table_add_alt_text.php @@ -0,0 +1,44 @@ +string('original_sha256')->nullable()->index()->after('user_id'); + $table->string('optimized_sha256')->nullable()->index()->after('original_sha256'); + $table->string('caption')->nullable()->after('thumbnail_url'); + $table->string('hls_path')->nullable()->after('caption'); + $table->timestamp('hls_transcoded_at')->nullable()->after('processed_at'); + $table->string('key')->nullable(); + $table->json('metadata')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('media', function (Blueprint $table) { + $table->dropColumn('original_sha256'); + $table->dropColumn('optimized_sha256'); + $table->dropColumn('caption'); + $table->dropColumn('hls_path'); + $table->dropColumn('hls_transcoded_at'); + $table->dropColumn('key'); + $table->dropColumn('metadata'); + }); + } +}