From 678f944af1fe98fb177696ee050138105c257601 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Sat, 13 Mar 2021 14:38:02 -0800 Subject: [PATCH] Remove development migrations --- ...2021_03_06_090902_add_times_to_recipes.php | 33 -------------- ...52009_add_description_delta_to_recipes.php | 45 ------------------- ..._active_time_with_cook_time_in_recipes.php | 36 --------------- 3 files changed, 114 deletions(-) delete mode 100644 database/migrations/2021_03_06_090902_add_times_to_recipes.php delete mode 100644 database/migrations/2021_03_08_052009_add_description_delta_to_recipes.php delete mode 100644 database/migrations/2021_03_13_134359_replace_active_time_with_cook_time_in_recipes.php diff --git a/database/migrations/2021_03_06_090902_add_times_to_recipes.php b/database/migrations/2021_03_06_090902_add_times_to_recipes.php deleted file mode 100644 index 9da6ac9..0000000 --- a/database/migrations/2021_03_06_090902_add_times_to_recipes.php +++ /dev/null @@ -1,33 +0,0 @@ -integer('time_prep')->nullable()->after('description'); - $table->integer('time_active')->nullable()->after('time_prep'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('recipes', function (Blueprint $table) { - $table->dropColumn(['time_prep', 'time_active']); - }); - } -} diff --git a/database/migrations/2021_03_08_052009_add_description_delta_to_recipes.php b/database/migrations/2021_03_08_052009_add_description_delta_to_recipes.php deleted file mode 100644 index 5789dbb..0000000 --- a/database/migrations/2021_03_08_052009_add_description_delta_to_recipes.php +++ /dev/null @@ -1,45 +0,0 @@ -longText('description_delta')->nullable()->after('description'); - }); - - foreach (Recipe::all() as $recipe) { - if (empty($recipe->description)) { - continue; - } - - // Format as a basic Quill Delta. - // See: https://quilljs.com/docs/delta/ - $delta = ['ops' => [['insert' => "{$recipe->description}\n"]]]; - $recipe->description_delta = json_encode($delta); - $recipe->save(); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('recipes', function (Blueprint $table) { - $table->dropColumn('description_delta'); - }); - } -} diff --git a/database/migrations/2021_03_13_134359_replace_active_time_with_cook_time_in_recipes.php b/database/migrations/2021_03_13_134359_replace_active_time_with_cook_time_in_recipes.php deleted file mode 100644 index d52ddc2..0000000 --- a/database/migrations/2021_03_13_134359_replace_active_time_with_cook_time_in_recipes.php +++ /dev/null @@ -1,36 +0,0 @@ -integer('time_cook')->nullable()->after('time_prep'); - }); - DB::update("UPDATE `recipes` SET `time_cook` = `time_active`;"); - Schema::table('recipes', function (Blueprint $table) { - $table->dropColumn(['time_active']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('recipes', function (Blueprint $table) { - $table->dropColumn(['time_cook']); - }); - } -}