From 242faeabd8f7c07516174dd04fef7b502d0fc505 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Sun, 30 May 2021 09:28:32 -0700 Subject: [PATCH] Remove temporary migrations --- ..._05_26_051434_add_meals_to_users_table.php | 38 ------------- ..._change_meal_to_int_in_journal_entries.php | 56 ------------------- 2 files changed, 94 deletions(-) delete mode 100644 database/migrations/2021_05_26_051434_add_meals_to_users_table.php delete mode 100644 database/migrations/2021_05_26_052938_change_meal_to_int_in_journal_entries.php diff --git a/database/migrations/2021_05_26_051434_add_meals_to_users_table.php b/database/migrations/2021_05_26_051434_add_meals_to_users_table.php deleted file mode 100644 index d259a13..0000000 --- a/database/migrations/2021_05_26_051434_add_meals_to_users_table.php +++ /dev/null @@ -1,38 +0,0 @@ -json('meals')->nullable()->after('name'); -// }); -// -// User::each(function (User $user) { -// $user->meals = User::getDefaultMeals(); -// $user->save(); -// }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { -// Schema::table('users', function (Blueprint $table) { -// $table->dropColumn('meals'); -// }); - } -} diff --git a/database/migrations/2021_05_26_052938_change_meal_to_int_in_journal_entries.php b/database/migrations/2021_05_26_052938_change_meal_to_int_in_journal_entries.php deleted file mode 100644 index 81cef3e..0000000 --- a/database/migrations/2021_05_26_052938_change_meal_to_int_in_journal_entries.php +++ /dev/null @@ -1,56 +0,0 @@ -integer('meal_int')->unsigned()->nullable()->after('protein'); -// }); -// DB::update('UPDATE `journal_entries` SET meal_int = -// IF(meal = "breakfast", 0, -// IF(meal = "lunch", 1, -// IF(meal = "dinner", 2, 3) -// ) -// )'); -// Schema::table('journal_entries', function (Blueprint $table) { -// $table->dropColumn('meal'); -// $table->renameColumn('meal_int', 'meal'); -// }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { -// Schema::table('journal_entries', function (Blueprint $table) { -// $table->renameColumn('meal', 'meal_int'); -// }); -// Schema::table('journal_entries', function (Blueprint $table) { -// $table->enum('meal', JournalEntry::meals()->pluck('value')->toArray())->after('protein'); -// }); -// DB::update('UPDATE `journal_entries` SET meal = -// IF(meal_int = 0, "breakfast", -// IF(meal_int = 1, "lunch", -// IF(meal_int = 2, "dinner", "snacks") -// ) -// )'); -// Schema::table('journal_entries', function (Blueprint $table) { -// $table->dropColumn('meal_int'); -// }); - } -}