From 7d0f7f72228196fdfa07c3db4861d64789fb2a19 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 26 Dec 2020 20:18:13 -0700 Subject: [PATCH] Add new migrations --- ...5_add_status_profile_id_to_likes_table.php | 36 +++++++++++++++++++ ..._013953_add_text_column_to_media_table.php | 32 +++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 database/migrations/2020_12_25_220825_add_status_profile_id_to_likes_table.php create mode 100644 database/migrations/2020_12_27_013953_add_text_column_to_media_table.php diff --git a/database/migrations/2020_12_25_220825_add_status_profile_id_to_likes_table.php b/database/migrations/2020_12_25_220825_add_status_profile_id_to_likes_table.php new file mode 100644 index 000000000..289b19108 --- /dev/null +++ b/database/migrations/2020_12_25_220825_add_status_profile_id_to_likes_table.php @@ -0,0 +1,36 @@ +bigInteger('status_profile_id')->nullable()->unsigned()->index()->after('status_id'); + $table->boolean('is_comment')->nullable()->index()->after('status_profile_id'); + $table->dropColumn('flagged'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('likes', function (Blueprint $table) { + $table->dropColumn('status_profile_id'); + $table->dropColumn('is_comment'); + $table->boolean('flagged')->default(false); + }); + } +} diff --git a/database/migrations/2020_12_27_013953_add_text_column_to_media_table.php b/database/migrations/2020_12_27_013953_add_text_column_to_media_table.php new file mode 100644 index 000000000..04a91abea --- /dev/null +++ b/database/migrations/2020_12_27_013953_add_text_column_to_media_table.php @@ -0,0 +1,32 @@ +text('cdn_url')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('media', function (Blueprint $table) { + $table->string('cdn_url')->nullable()->change(); + }); + } +}