From ed9b7f1ccf693e745bc129025d4caae7efd5516a Mon Sep 17 00:00:00 2001 From: Anatoliy Poloz Date: Mon, 22 Jan 2024 11:53:19 +0300 Subject: [PATCH] trash removed --- database/.gitignore | 1 - database/factories/BlogPostFactory.php | 47 ---------- database/factories/DiaryFactory.php | 32 ------- database/factories/DietFactory.php | 89 ------------------- database/factories/PlanCommentFactory.php | 26 ------ database/factories/PlanFactory.php | 79 ---------------- database/factories/UserDetailzFactory.php | 50 ----------- database/factories/UserFactory.php | 69 -------------- .../2014_10_12_000000_create_users_table.php | 34 ------- ...12_100000_create_password_resets_table.php | 32 ------- ..._add_two_factor_columns_to_users_table.php | 46 ---------- ..._08_19_000000_create_failed_jobs_table.php | 36 -------- ...01_create_personal_access_tokens_table.php | 33 ------- ...022_03_30_125533_create_sessions_table.php | 35 -------- ...3_31_093623_create_user_detailzs_table.php | 53 ----------- ...2022_04_05_105659_create_diaries_table.php | 42 --------- .../2022_04_05_105723_create_meals_table.php | 45 ---------- ...022_04_06_140318_create_portions_table.php | 38 -------- .../2022_04_13_123342_add_closed_to_tasks.php | 32 ------- ...22_04_14_110737_create_calendars_table.php | 31 ------- ...19_create_circumference_measures_table.php | 35 -------- ...17_111617_create_weight_measures_table.php | 33 ------- ...0407_create_consultant_education_table.php | 39 -------- ...3_140744_create_user_attachments_table.php | 37 -------- ...5_26_101953_add_is_consultant_to_users.php | 32 ------- ...2724_create_meal_user_attachment_table.php | 33 ------- ...create_consultant_diary_comments_table.php | 35 -------- ...22_06_03_131304_add_comment_to_diaries.php | 32 ------- .../2022_06_29_135450_create_plans_table.php | 41 --------- ...2_06_30_090341_create_rich_texts_table.php | 26 ------ .../2022_07_08_083503_create_plan_author.php | 31 ------- ...7_22_105447_create_plan_comments_table.php | 35 -------- ...2_07_25_100927_create_plan_likes_table.php | 33 ------- ...26_111407_create_comment_upvotes_table.php | 34 ------- .../2022_08_26_094740_create_diets_table.php | 38 -------- .../2022_08_31_111901_diet_author.php | 31 ------- ...8_31_113609_create_diet_comments_table.php | 35 -------- ...2_08_31_113618_create_diet_likes_table.php | 33 ------- ...1104_create_diet_comment_upvotes_table.php | 34 ------- .../2022_09_06_115121_create_views_table.php | 62 ------------- ...09_12_125812_create_chosen_plans_table.php | 35 -------- ...09_12_125818_create_chosen_diets_table.php | 35 -------- ...9_12_132727_create_state_history_table.php | 35 -------- ...2_11_29_082630_create_blog_posts_table.php | 35 -------- ...2022_11_29_082657_create_recipes_table.php | 38 -------- .../2022_11_29_090908_create_tags_table.php | 32 ------- ...22_12_01_094513_create_taggables_table.php | 32 ------- .../2022_12_01_120945_blog_post_author.php | 31 ------- .../2022_12_01_121006_recipe_author.php | 31 ------- ...123439_create_blog_post_comments_table.php | 35 -------- ...06_123459_create_blog_post_likes_table.php | 33 ------- ...create_blog_post_comment_upvotes_table.php | 34 ------- ...06_124917_create_recipe_comments_table.php | 35 -------- ...12_06_124931_create_recipe_likes_table.php | 33 ------- ...40_create_recipe_comment_upvotes_table.php | 34 ------- ...7_101359_add_title_to_blog_posts_table.php | 32 ------- ...2_07_101435_add_title_to_recipes_table.php | 32 ------- ...rename_recipe_youtube_url_to_video_url.php | 32 ------- ...23_01_25_073135_add_recipe_type_column.php | 32 ------- .../2023_02_16_123259_create_chats_table.php | 34 ------- ..._26_145818_create_product_groups_table.php | 33 ------- ...reate_product_nutritional_values_table.php | 45 ---------- ...023_08_23_174247_create_finances_table.php | 31 ------- ...320_add_height_column_to_user_detailzs.php | 28 ------ ...622_add_fillable_to_table_user_detailz.php | 30 ------- ...23_09_01_152657_add_is_public_to_users.php | 28 ------ ...create_consultant_legal_entities_table.php | 46 ---------- .../2023_12_20_105039_add_slug_to_plan.php | 28 ------ database/seeders/BlogPostSeeder.php | 18 ---- database/seeders/DatabaseSeeder.php | 23 ----- database/seeders/DietsSeeder.php | 23 ----- database/seeders/PlanAuthor.php | 25 ------ database/seeders/PlanCommentSeeder.php | 37 -------- database/seeders/PlanSeeder.php | 17 ---- database/seeders/UserSeeder.php | 59 ------------ 75 files changed, 2700 deletions(-) delete mode 100644 database/.gitignore delete mode 100644 database/factories/BlogPostFactory.php delete mode 100644 database/factories/DiaryFactory.php delete mode 100644 database/factories/DietFactory.php delete mode 100755 database/factories/PlanCommentFactory.php delete mode 100755 database/factories/PlanFactory.php delete mode 100644 database/factories/UserDetailzFactory.php delete mode 100644 database/factories/UserFactory.php delete mode 100644 database/migrations/2014_10_12_000000_create_users_table.php delete mode 100644 database/migrations/2014_10_12_100000_create_password_resets_table.php delete mode 100644 database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php delete mode 100644 database/migrations/2019_08_19_000000_create_failed_jobs_table.php delete mode 100644 database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php delete mode 100644 database/migrations/2022_03_30_125533_create_sessions_table.php delete mode 100644 database/migrations/2022_03_31_093623_create_user_detailzs_table.php delete mode 100644 database/migrations/2022_04_05_105659_create_diaries_table.php delete mode 100644 database/migrations/2022_04_05_105723_create_meals_table.php delete mode 100644 database/migrations/2022_04_06_140318_create_portions_table.php delete mode 100644 database/migrations/2022_04_13_123342_add_closed_to_tasks.php delete mode 100644 database/migrations/2022_04_14_110737_create_calendars_table.php delete mode 100644 database/migrations/2022_05_13_131919_create_circumference_measures_table.php delete mode 100644 database/migrations/2022_05_17_111617_create_weight_measures_table.php delete mode 100644 database/migrations/2022_05_20_120407_create_consultant_education_table.php delete mode 100644 database/migrations/2022_05_23_140744_create_user_attachments_table.php delete mode 100644 database/migrations/2022_05_26_101953_add_is_consultant_to_users.php delete mode 100644 database/migrations/2022_05_30_142724_create_meal_user_attachment_table.php delete mode 100644 database/migrations/2022_06_03_085504_create_consultant_diary_comments_table.php delete mode 100644 database/migrations/2022_06_03_131304_add_comment_to_diaries.php delete mode 100644 database/migrations/2022_06_29_135450_create_plans_table.php delete mode 100644 database/migrations/2022_06_30_090341_create_rich_texts_table.php delete mode 100644 database/migrations/2022_07_08_083503_create_plan_author.php delete mode 100644 database/migrations/2022_07_22_105447_create_plan_comments_table.php delete mode 100644 database/migrations/2022_07_25_100927_create_plan_likes_table.php delete mode 100644 database/migrations/2022_07_26_111407_create_comment_upvotes_table.php delete mode 100644 database/migrations/2022_08_26_094740_create_diets_table.php delete mode 100644 database/migrations/2022_08_31_111901_diet_author.php delete mode 100644 database/migrations/2022_08_31_113609_create_diet_comments_table.php delete mode 100644 database/migrations/2022_08_31_113618_create_diet_likes_table.php delete mode 100644 database/migrations/2022_09_05_101104_create_diet_comment_upvotes_table.php delete mode 100644 database/migrations/2022_09_06_115121_create_views_table.php delete mode 100644 database/migrations/2022_09_12_125812_create_chosen_plans_table.php delete mode 100644 database/migrations/2022_09_12_125818_create_chosen_diets_table.php delete mode 100644 database/migrations/2022_09_12_132727_create_state_history_table.php delete mode 100644 database/migrations/2022_11_29_082630_create_blog_posts_table.php delete mode 100644 database/migrations/2022_11_29_082657_create_recipes_table.php delete mode 100644 database/migrations/2022_11_29_090908_create_tags_table.php delete mode 100644 database/migrations/2022_12_01_094513_create_taggables_table.php delete mode 100644 database/migrations/2022_12_01_120945_blog_post_author.php delete mode 100644 database/migrations/2022_12_01_121006_recipe_author.php delete mode 100644 database/migrations/2022_12_06_123439_create_blog_post_comments_table.php delete mode 100644 database/migrations/2022_12_06_123459_create_blog_post_likes_table.php delete mode 100644 database/migrations/2022_12_06_123516_create_blog_post_comment_upvotes_table.php delete mode 100644 database/migrations/2022_12_06_124917_create_recipe_comments_table.php delete mode 100644 database/migrations/2022_12_06_124931_create_recipe_likes_table.php delete mode 100644 database/migrations/2022_12_06_124940_create_recipe_comment_upvotes_table.php delete mode 100644 database/migrations/2022_12_07_101359_add_title_to_blog_posts_table.php delete mode 100644 database/migrations/2022_12_07_101435_add_title_to_recipes_table.php delete mode 100644 database/migrations/2023_01_13_092119_rename_recipe_youtube_url_to_video_url.php delete mode 100644 database/migrations/2023_01_25_073135_add_recipe_type_column.php delete mode 100644 database/migrations/2023_02_16_123259_create_chats_table.php delete mode 100644 database/migrations/2023_07_26_145818_create_product_groups_table.php delete mode 100644 database/migrations/2023_07_26_150531_create_product_nutritional_values_table.php delete mode 100644 database/migrations/2023_08_23_174247_create_finances_table.php delete mode 100644 database/migrations/2023_08_30_135320_add_height_column_to_user_detailzs.php delete mode 100644 database/migrations/2023_09_01_113622_add_fillable_to_table_user_detailz.php delete mode 100644 database/migrations/2023_09_01_152657_add_is_public_to_users.php delete mode 100644 database/migrations/2023_09_14_145239_create_consultant_legal_entities_table.php delete mode 100644 database/migrations/2023_12_20_105039_add_slug_to_plan.php delete mode 100644 database/seeders/BlogPostSeeder.php delete mode 100644 database/seeders/DatabaseSeeder.php delete mode 100644 database/seeders/DietsSeeder.php delete mode 100644 database/seeders/PlanAuthor.php delete mode 100755 database/seeders/PlanCommentSeeder.php delete mode 100755 database/seeders/PlanSeeder.php delete mode 100644 database/seeders/UserSeeder.php diff --git a/database/.gitignore b/database/.gitignore deleted file mode 100644 index 9b19b93..0000000 --- a/database/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.sqlite* diff --git a/database/factories/BlogPostFactory.php b/database/factories/BlogPostFactory.php deleted file mode 100644 index 1780ea6..0000000 --- a/database/factories/BlogPostFactory.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -class BlogPostFactory extends Factory -{ - protected $model = BlogPost::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition() - { - $imagePath = storage_path('app/public'); - $curImage = $this->faker->image($imagePath.'/blog_posts', 360, 360, 'animals', true, true, 'cats', true, 'jpg'); - $curImage = Str::replace($imagePath, '', $curImage); - - return [ - 'state' => $this->faker->randomElement(['active', 'archived']), - 'image' => $curImage, - 'description' => $this->faker->realText($this->faker->numberBetween(100, 200)), - 'youtube_url' => $this->faker->url(), - 'created_at' => $this->faker->dateTimeBetween('-1 week', '+1 week'), - 'updated_at' => $this->faker->dateTimeBetween('-1 week', '+1 week'), - 'title' => $this->faker->realText($this->faker->numberBetween(10, 20)), - ]; - } - - public function some() - { - User::orderBy('created_at', 'desc')->limit(20)->get()->map(function ($user) { - $newBlogPosts = BlogPost::factory()->count(3)->create(); - $newBlogPosts->map(function ($post) use ($user) { - $user->author_of_blog_post()->attach($post->id); - }); - }); - } -} diff --git a/database/factories/DiaryFactory.php b/database/factories/DiaryFactory.php deleted file mode 100644 index f36205d..0000000 --- a/database/factories/DiaryFactory.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -class DiaryFactory extends Factory -{ - protected $model = Diary::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition() - { - return [ - 'user_id' => User::factory(), - 'date' => $this->faker->date('Y-m-d'), - 'wakeup' => '06:30:00', - 'retire' => '22:30:00', - 'comment' => 'some comment for tests', - 'closed' => false, - ]; - } -} diff --git a/database/factories/DietFactory.php b/database/factories/DietFactory.php deleted file mode 100644 index d4917be..0000000 --- a/database/factories/DietFactory.php +++ /dev/null @@ -1,89 +0,0 @@ - - */ -class DietFactory extends Factory -{ - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - $faker = \Faker\Factory::create(); - $this->faker->addProvider(new Restaurant($faker)); - $dietDuration = $this->faker->randomElement([7, 14, 21]); - $dietState = $this->faker->randomElement(['active','draft','archived']); - $numberOfDefinedDietTypes = $this->faker->numberBetween(1, 4); - $expectedDietTypes = ['meat', 'veg', 'corb', 'alko']; - $selectedDietTypes = $this->faker->randomElements($expectedDietTypes, $numberOfDefinedDietTypes); - $dietTypes = array_reduce( - $selectedDietTypes, - function($acc, $el) { - $acc[$el] = true; - return $acc; - }, - [] - ); - $dietEatingTypes = ['breakfast', 'dinner', 'supper', 'lunch', 'snacks']; - $dailySchedule = []; - $images = ['1.jpg', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.png', '8.png', '9.jpg', '10.png']; - Storage::fake('diets'); - $imageFileKey = $this->faker->numberBetween(0, 9); - $imageFilePath = 'database/assets/images/diets/' . $images[$imageFileKey]; - $file = new File($imageFilePath); - $fileLocalPath = Storage::putFile('diets', $file, 'public'); - - for($day = 1; $day <= $dietDuration ; $day++) { - foreach($dietEatingTypes as $eatingType) { - - $numberOfProductsInCurrentMeel = $this->faker->numberBetween(1, 4); - - for(;$numberOfProductsInCurrentMeel > 0; $numberOfProductsInCurrentMeel--) { - $meelName = $this->faker->foodName(); - $dailySchedule[$day][$eatingType][] = [ - 'name' => $meelName, - 'quantity' => $this->faker->numberBetween(1, 1000), - 'portion' => $this->faker->randomElement(['grams', 'pcs', 'milliliters']), - 'uniq' => $meelName . '-' . time(), - ]; - } - } - } - - $dietName = $this->faker->randomElement([ - $this->faker->foodName(), - $this->faker->beverageName(), - $this->faker->dairyName(), - $this->faker->vegetableName(), - $this->faker->fruitName(), - $this->faker->meatName(), - $this->faker->sauceName(), - ]); - - $dietNamePrefix = $this->faker->randomElement(['Super', 'Keto', 'Fast', 'Detox', 'Power Of', 'Green', 'Healthy', 'Turbo']); - - return [ - 'name' => $dietNamePrefix . " " . $dietName . " Diet", - 'duration' => $dietDuration, - 'state' => $dietState, - 'image' => $fileLocalPath, - 'type' => $dietTypes, - 'details' => $this->faker->paragraph(3, true), - 'daily_schedule' => $dailySchedule - ]; - } -} diff --git a/database/factories/PlanCommentFactory.php b/database/factories/PlanCommentFactory.php deleted file mode 100755 index 273be38..0000000 --- a/database/factories/PlanCommentFactory.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -class PlanCommentFactory extends Factory -{ - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - - return [ - 'grade' => $this->faker->randomDigit(), - 'body' => $this->faker->text(), - ]; - - } -} diff --git a/database/factories/PlanFactory.php b/database/factories/PlanFactory.php deleted file mode 100755 index 6a5ccba..0000000 --- a/database/factories/PlanFactory.php +++ /dev/null @@ -1,79 +0,0 @@ - - */ -class PlanFactory extends Factory -{ - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - - $faker = \Faker\Factory::create(); - $this->faker->addProvider(new Restaurant($faker)); - - $active = $this->faker->boolean(); - - $typeBody = [ - 'fit' => $this->faker->boolean(), - 'slim' => $this->faker->boolean(), - 'behavior' => $this->faker->boolean(), - 'wellness' => $this->faker->boolean(), - ]; - - $wrongTypeBody = json_encode($typeBody); - - $packetsOptions1 = [ - 'items' => [$this->faker->fruitName(), $this->faker->meatName(), $this->faker->sauceName()], - 'price' => $this->faker->randomNumber(), - 'short' => $this->faker->foodName(), - 'description' => $this->faker->text(), - ]; - - - $packetsOptions2 = [ - 'items' => [$this->faker->fruitName(), $this->faker->meatName(), $this->faker->sauceName()], - 'price' => $this->faker->randomNumber(), - 'short' => $this->faker->foodName(), - 'description' => $this->faker->text(), - ]; - - - $packetsOptions3 = [ - 'items' => [$this->faker->fruitName(), $this->faker->meatName(), $this->faker->sauceName()], - 'price' => $this->faker->randomNumber(), - 'short' => $this->faker->foodName(), - 'description' => $this->faker->text(), - ]; - - Storage::fake('plans'); - $file = UploadedFile::fake()->image('plan.png'); - $fileLocalPath = $file->store('plans', 'public'); - - return [ - 'name' => $this->faker->foodName(), - // 'image' => UploadedFile::fake()->image('plans/Photo_C.png'), - 'image' => $fileLocalPath, - 'duration' => $this->faker->randomElement([7, 14, 21]), - 'state' => $this->faker->randomElement(['active', 'draft', 'unactive']), - //'type' => $this->faker->randomElement([$typeBody, $wrongTypeBody]), - 'type' => $typeBody, - 'details' => $this->faker->text(), - 'packets_count' => $this->faker->randomElement([1, 3]), - 'packet1_options' => $packetsOptions1, - 'packet2_options' => $active ? $packetsOptions2 : '', - 'packet3_options' => $active ? $packetsOptions3 : '', - ]; - } -} diff --git a/database/factories/UserDetailzFactory.php b/database/factories/UserDetailzFactory.php deleted file mode 100644 index 6bd865b..0000000 --- a/database/factories/UserDetailzFactory.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ -class UserDetailzFactory extends Factory -{ - protected $model = UserDetailz::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition() - { - return [ - // 'user_id' => User::factory(), - 'first_name' => $this->faker->name(), - 'last_name' => $this->faker->name(), - 'birthdate' => $this->faker->date('Y-m-d'), - 'gender' => $this->faker->randomElement(['male', 'female']), - 'country' => $this->faker->countryCode(), - 'city' => $this->faker->randomElement(['Moscow', 'Kyev', 'New-York', 'Minsk']), - 'lang' => $this->faker->languageCode(), - 'weight' => $this->faker->numberBetween(90, 200), - 'chest_circumference' => $this->faker->randomNumber(2, true), - 'waist_circumference' => $this->faker->randomNumber(2, true), - 'hip_circumference' => $this->faker->randomNumber(2, true), - 'blood_pressure_up' => $this->faker->randomNumber(3, true), - 'blood_pressure_down' => $this->faker->randomNumber(3, true), - 'has_hypo' => $this->faker->randomElement(['0', '1']), - 'has_hyper' => $this->faker->randomElement(['0', '1']), - 'about_alergy' => $this->faker->text(), - 'about_taking_pils' => $this->faker->text(), - 'about_sport_hobbies' => $this->faker->text(), - 'favorite_foods' => $this->faker->text(), - 'unfavorite_foods' => $this->faker->text(), - 'additional_info' => $this->faker->text(), - 'is_mood_fillable' => $this->faker->boolean(), - 'is_bedtime_fillable' => $this->faker->boolean(), - ]; - } -} diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php deleted file mode 100644 index 563d0f4..0000000 --- a/database/factories/UserFactory.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ -class UserFactory extends Factory -{ - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - - return [ - 'name' => $this->faker->name(), - 'email' => $this->faker->unique()->safeEmail(), - 'email_verified_at' => now(), - 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password - 'two_factor_secret' => null, - 'two_factor_recovery_codes' => null, - 'remember_token' => Str::random(10), - 'profile_photo_path' => null, - 'current_team_id' => null, - ]; - } - - /** - * Indicate that the model's email address should be unverified. - */ - public function unverified(): static - { - return $this->state(function (array $attributes) { - return [ - 'email_verified_at' => null, - ]; - }); - } - - /** - * Indicate that the user should have a personal team. - */ - public function withPersonalTeam(?callable $callback = null): static - { - if (! Features::hasTeamFeatures()) { - return $this->state([]); - } - - return $this->has( - Team::factory() - ->state(fn (array $attributes, User $user) => [ - 'name' => $user->name.'\'s Team', - 'user_id' => $user->id, - 'personal_team' => true, - ]) - ->when(is_callable($callback), $callback), - 'ownedTeams' - ); - } -} diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php deleted file mode 100644 index f56e5c6..0000000 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); - $table->rememberToken(); - $table->foreignId('current_team_id')->nullable(); - $table->string('profile_photo_path', 2048)->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('users'); - } -}; diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php deleted file mode 100644 index fcacb80..0000000 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('email')->index(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('password_resets'); - } -}; diff --git a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php deleted file mode 100644 index b490e24..0000000 --- a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php +++ /dev/null @@ -1,46 +0,0 @@ -text('two_factor_secret') - ->after('password') - ->nullable(); - - $table->text('two_factor_recovery_codes') - ->after('two_factor_secret') - ->nullable(); - - if (Fortify::confirmsTwoFactorAuthentication()) { - $table->timestamp('two_factor_confirmed_at') - ->after('two_factor_recovery_codes') - ->nullable(); - } - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn(array_merge([ - 'two_factor_secret', - 'two_factor_recovery_codes', - ], Fortify::confirmsTwoFactorAuthentication() ? [ - 'two_factor_confirmed_at', - ] : [])); - }); - } -}; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php deleted file mode 100644 index 1719198..0000000 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ /dev/null @@ -1,36 +0,0 @@ -id(); - $table->string('uuid')->unique(); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('failed_jobs'); - } -}; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php deleted file mode 100644 index e828ad8..0000000 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->morphs('tokenable'); - $table->string('name'); - $table->string('token', 64)->unique(); - $table->text('abilities')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->timestamp('expires_at')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('personal_access_tokens'); - } -}; diff --git a/database/migrations/2022_03_30_125533_create_sessions_table.php b/database/migrations/2022_03_30_125533_create_sessions_table.php deleted file mode 100644 index c455537..0000000 --- a/database/migrations/2022_03_30_125533_create_sessions_table.php +++ /dev/null @@ -1,35 +0,0 @@ -string('id')->primary(); - $table->foreignId('user_id')->nullable()->index(); - $table->string('ip_address', 45)->nullable(); - $table->text('user_agent')->nullable(); - $table->text('payload'); - $table->integer('last_activity')->index(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('sessions'); - } -}; diff --git a/database/migrations/2022_03_31_093623_create_user_detailzs_table.php b/database/migrations/2022_03_31_093623_create_user_detailzs_table.php deleted file mode 100644 index 095f5dc..0000000 --- a/database/migrations/2022_03_31_093623_create_user_detailzs_table.php +++ /dev/null @@ -1,53 +0,0 @@ -id(); - $table->bigInteger('user_id')->nullable(); - $table->string('first_name', 256)->default(''); - $table->string('last_name', 256)->default(''); - $table->date('birthdate')->default('1980-01-01')->nullable(false); - $table->string('gender')->default(''); - $table->string('country')->default(''); - $table->string('city')->default(''); - $table->string('lang')->default(''); - $table->smallInteger('weight')->default(0); - $table->smallInteger('chest_circumference')->default(0); - $table->smallInteger('waist_circumference')->default(0); - $table->smallInteger('hip_circumference')->default(0); - $table->smallInteger('blood_pressure_up')->default(0); - $table->smallInteger('blood_pressure_down')->default(0); - $table->boolean('has_hypo')->default(false); - $table->boolean('has_hyper')->default(false); - $table->text('about_alergy'); - $table->text('about_taking_pils'); - $table->text('about_sport_hobbies'); - $table->text('favorite_foods'); - $table->text('unfavorite_foods'); - $table->text('additional_info'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('user_detailzs'); - } -}; diff --git a/database/migrations/2022_04_05_105659_create_diaries_table.php b/database/migrations/2022_04_05_105659_create_diaries_table.php deleted file mode 100644 index 7a4361e..0000000 --- a/database/migrations/2022_04_05_105659_create_diaries_table.php +++ /dev/null @@ -1,42 +0,0 @@ -id(); - $table->foreignId('user_id') - ->nullable() - ->constrained() - ->onUpdate('cascade') - ->onDelete('cascade'); - /* $table->unsignedBigInteger('user_id'); */ - $table->date('date'); - $table->time('wakeup'); - $table->time('retire'); - $table->timestamps(); - /* $table->foreign('user_id')->references('id')->on('users'); */ - - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('diaries'); - } -}; diff --git a/database/migrations/2022_04_05_105723_create_meals_table.php b/database/migrations/2022_04_05_105723_create_meals_table.php deleted file mode 100644 index 1022e26..0000000 --- a/database/migrations/2022_04_05_105723_create_meals_table.php +++ /dev/null @@ -1,45 +0,0 @@ -id(); - $table->foreignId('user_id') - ->nullable() - ->constrained('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - $table->foreignId('diary_id') - ->nullable() - ->constrained('diaries') - ->onUpdate('cascade') - ->onDelete('cascade'); - $table->time('time'); - $table->unsignedTinyInteger('type'); - $table->tinyInteger('satiety'); - $table->tinyInteger('mood'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('meals'); - } -}; diff --git a/database/migrations/2022_04_06_140318_create_portions_table.php b/database/migrations/2022_04_06_140318_create_portions_table.php deleted file mode 100644 index 41e56b2..0000000 --- a/database/migrations/2022_04_06_140318_create_portions_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->foreignId('meal_id') - ->constrained('meals') - ->onUpdate('cascade') - ->onDelete('cascade'); - $table->string('product_name'); - $table->string('portion'); - $table->smallInteger('quantity'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('portions'); - } -}; diff --git a/database/migrations/2022_04_13_123342_add_closed_to_tasks.php b/database/migrations/2022_04_13_123342_add_closed_to_tasks.php deleted file mode 100644 index efb7c7d..0000000 --- a/database/migrations/2022_04_13_123342_add_closed_to_tasks.php +++ /dev/null @@ -1,32 +0,0 @@ -boolean('closed')->default(false); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('diaries', function (Blueprint $table) { - $table->dropColumn('closed'); - }); - } -}; diff --git a/database/migrations/2022_04_14_110737_create_calendars_table.php b/database/migrations/2022_04_14_110737_create_calendars_table.php deleted file mode 100644 index 7776206..0000000 --- a/database/migrations/2022_04_14_110737_create_calendars_table.php +++ /dev/null @@ -1,31 +0,0 @@ -id(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('calendars'); - } -}; diff --git a/database/migrations/2022_05_13_131919_create_circumference_measures_table.php b/database/migrations/2022_05_13_131919_create_circumference_measures_table.php deleted file mode 100644 index 6c85d52..0000000 --- a/database/migrations/2022_05_13_131919_create_circumference_measures_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->bigInteger('user_id'); - $table->smallInteger('chest_circumference')->default(0); - $table->smallInteger('waist_circumference')->default(0); - $table->smallInteger('hip_circumference')->default(0); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('circumference_measures'); - } -}; diff --git a/database/migrations/2022_05_17_111617_create_weight_measures_table.php b/database/migrations/2022_05_17_111617_create_weight_measures_table.php deleted file mode 100644 index d251581..0000000 --- a/database/migrations/2022_05_17_111617_create_weight_measures_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->bigInteger('user_id'); - $table->smallInteger('weight')->default(0); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('weight_measures'); - } -}; diff --git a/database/migrations/2022_05_20_120407_create_consultant_education_table.php b/database/migrations/2022_05_20_120407_create_consultant_education_table.php deleted file mode 100644 index 907e9a7..0000000 --- a/database/migrations/2022_05_20_120407_create_consultant_education_table.php +++ /dev/null @@ -1,39 +0,0 @@ -id(); - $table->bigInteger('user_id'); - $table->json('completed_courses'); - $table->boolean('has_medical_education')->default(false); - $table->string('vk_link')->default(''); - $table->string('insta_link')->default(''); - $table->string('fb_link')->default(''); - $table->string('tg_link')->default(''); - $table->string('request_state')->default(''); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('consultant_education'); - } -}; diff --git a/database/migrations/2022_05_23_140744_create_user_attachments_table.php b/database/migrations/2022_05_23_140744_create_user_attachments_table.php deleted file mode 100644 index 085a76b..0000000 --- a/database/migrations/2022_05_23_140744_create_user_attachments_table.php +++ /dev/null @@ -1,37 +0,0 @@ -id(); - $table->bigInteger('user_id'); - $table->string('group')->default('user_files'); - $table->string('original_name'); - $table->string('path'); - $table->integer('size')->default(0); - $table->json('specs'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('user_attachments'); - } -}; diff --git a/database/migrations/2022_05_26_101953_add_is_consultant_to_users.php b/database/migrations/2022_05_26_101953_add_is_consultant_to_users.php deleted file mode 100644 index 2ffe046..0000000 --- a/database/migrations/2022_05_26_101953_add_is_consultant_to_users.php +++ /dev/null @@ -1,32 +0,0 @@ -boolean('is_consultant')->default(false); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('is_consultant'); - }); - } -}; diff --git a/database/migrations/2022_05_30_142724_create_meal_user_attachment_table.php b/database/migrations/2022_05_30_142724_create_meal_user_attachment_table.php deleted file mode 100644 index 3ab5ec2..0000000 --- a/database/migrations/2022_05_30_142724_create_meal_user_attachment_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->bigInteger('meal_id'); - $table->bigInteger('user_attachment_id'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('meal_user_attachment'); - } -}; diff --git a/database/migrations/2022_06_03_085504_create_consultant_diary_comments_table.php b/database/migrations/2022_06_03_085504_create_consultant_diary_comments_table.php deleted file mode 100644 index 1b8960f..0000000 --- a/database/migrations/2022_06_03_085504_create_consultant_diary_comments_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->bigInteger('user_id')->comment('consultant id'); - $table->bigInteger('diary_id'); - $table->string('comment_type', 128); - $table->text('comment'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('consultant_diary_comments'); - } -}; diff --git a/database/migrations/2022_06_03_131304_add_comment_to_diaries.php b/database/migrations/2022_06_03_131304_add_comment_to_diaries.php deleted file mode 100644 index b71057b..0000000 --- a/database/migrations/2022_06_03_131304_add_comment_to_diaries.php +++ /dev/null @@ -1,32 +0,0 @@ -text('comment'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('diaries', function (Blueprint $table) { - $table->dropColumn('comment'); - }); - } -}; diff --git a/database/migrations/2022_06_29_135450_create_plans_table.php b/database/migrations/2022_06_29_135450_create_plans_table.php deleted file mode 100644 index f447088..0000000 --- a/database/migrations/2022_06_29_135450_create_plans_table.php +++ /dev/null @@ -1,41 +0,0 @@ -id(); - $table->string('name')->comment('name of plan'); - $table->string('image')->nullable()->comment('public path to image'); - $table->smallInteger('duration')->comment('plan duration - 7, 14, 21 days'); - $table->string('state')->comment('active/draft/archived'); - $table->json('type')->comment('to lose weight, to gain weight, to improve your mood, to shape your eating behavior'); - $table->text('details')->comment('plan details'); - $table->tinyInteger('packets_count')->comment('1 on 3 packets of options in plan'); - $table->json('packet1_options'); - $table->json('packet2_options'); - $table->json('packet3_options'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('plans'); - } -}; diff --git a/database/migrations/2022_06_30_090341_create_rich_texts_table.php b/database/migrations/2022_06_30_090341_create_rich_texts_table.php deleted file mode 100644 index 0ecd6bf..0000000 --- a/database/migrations/2022_06_30_090341_create_rich_texts_table.php +++ /dev/null @@ -1,26 +0,0 @@ -id(); - $table->morphs('record'); - $table->string('field'); - $table->longText('body')->nullable(); - $table->timestamps(); - - $table->unique(['field', 'record_type', 'record_id']); - }); - } - - public function down() - { - Schema::dropIfExists('rich_texts'); - } -}; diff --git a/database/migrations/2022_07_08_083503_create_plan_author.php b/database/migrations/2022_07_08_083503_create_plan_author.php deleted file mode 100644 index c5a9dc9..0000000 --- a/database/migrations/2022_07_08_083503_create_plan_author.php +++ /dev/null @@ -1,31 +0,0 @@ -bigInteger('user_id'); - $table->bigInteger('plan_id'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('plan_author'); - } -}; diff --git a/database/migrations/2022_07_22_105447_create_plan_comments_table.php b/database/migrations/2022_07_22_105447_create_plan_comments_table.php deleted file mode 100644 index f75a027..0000000 --- a/database/migrations/2022_07_22_105447_create_plan_comments_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->bigInteger('user_id'); - $table->bigInteger('plan_id'); - $table->smallInteger('grade')->default(0); - $table->longText('body')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('plan_comments'); - } -}; diff --git a/database/migrations/2022_07_25_100927_create_plan_likes_table.php b/database/migrations/2022_07_25_100927_create_plan_likes_table.php deleted file mode 100644 index 7e8c36b..0000000 --- a/database/migrations/2022_07_25_100927_create_plan_likes_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->foreignId('plan_id'); - $table->foreignId('user_id'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('plan_likes'); - } -}; diff --git a/database/migrations/2022_07_26_111407_create_comment_upvotes_table.php b/database/migrations/2022_07_26_111407_create_comment_upvotes_table.php deleted file mode 100644 index db2097c..0000000 --- a/database/migrations/2022_07_26_111407_create_comment_upvotes_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->foreignId('comment_id'); - $table->foreignId('user_id'); - $table->string('type')->default('upvote'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('comment_upvotes'); - } -}; diff --git a/database/migrations/2022_08_26_094740_create_diets_table.php b/database/migrations/2022_08_26_094740_create_diets_table.php deleted file mode 100644 index 5a9fb41..0000000 --- a/database/migrations/2022_08_26_094740_create_diets_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->string('name')->comment('name of diet'); - $table->string('image')->nullable()->comment('public path to image'); - $table->smallInteger('duration')->comment('diet duration - 7, 14, 28 days'); - $table->string('state')->comment('active/draft/archived'); - $table->json('type')->comment('has meat/vegs/carb/alcohol'); - $table->text('details')->comment('diet details'); - $table->json('daily_schedule')->comment('A list of planned foods'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('diets'); - } -}; diff --git a/database/migrations/2022_08_31_111901_diet_author.php b/database/migrations/2022_08_31_111901_diet_author.php deleted file mode 100644 index a9ac9f3..0000000 --- a/database/migrations/2022_08_31_111901_diet_author.php +++ /dev/null @@ -1,31 +0,0 @@ -bigInteger('user_id'); - $table->bigInteger('diet_id'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('diet_author'); - } -}; diff --git a/database/migrations/2022_08_31_113609_create_diet_comments_table.php b/database/migrations/2022_08_31_113609_create_diet_comments_table.php deleted file mode 100644 index b0081f7..0000000 --- a/database/migrations/2022_08_31_113609_create_diet_comments_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->bigInteger('user_id'); - $table->bigInteger('diet_id'); - $table->smallInteger('grade')->default(0); - $table->longText('body')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('diet_comments'); - } -}; diff --git a/database/migrations/2022_08_31_113618_create_diet_likes_table.php b/database/migrations/2022_08_31_113618_create_diet_likes_table.php deleted file mode 100644 index dbdcb06..0000000 --- a/database/migrations/2022_08_31_113618_create_diet_likes_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->foreignId('diet_id'); - $table->foreignId('user_id'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('diet_likes'); - } -}; diff --git a/database/migrations/2022_09_05_101104_create_diet_comment_upvotes_table.php b/database/migrations/2022_09_05_101104_create_diet_comment_upvotes_table.php deleted file mode 100644 index ad6c10a..0000000 --- a/database/migrations/2022_09_05_101104_create_diet_comment_upvotes_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->foreignId('comment_id'); - $table->foreignId('user_id'); - $table->string('type')->default('upvote'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('diet_comment_upvotes'); - } -}; diff --git a/database/migrations/2022_09_06_115121_create_views_table.php b/database/migrations/2022_09_06_115121_create_views_table.php deleted file mode 100644 index fc140dd..0000000 --- a/database/migrations/2022_09_06_115121_create_views_table.php +++ /dev/null @@ -1,62 +0,0 @@ -schema = Schema::connection( - config('eloquent-viewable.models.view.connection') - ); - - $this->table = config('eloquent-viewable.models.view.table_name'); - } - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - $this->schema->create($this->table, function (Blueprint $table) { - $table->bigIncrements('id'); - $table->morphs('viewable'); - $table->text('visitor')->nullable(); - $table->string('collection')->nullable(); - $table->timestamp('viewed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists($this->table); - } -} diff --git a/database/migrations/2022_09_12_125812_create_chosen_plans_table.php b/database/migrations/2022_09_12_125812_create_chosen_plans_table.php deleted file mode 100644 index 8ea92c3..0000000 --- a/database/migrations/2022_09_12_125812_create_chosen_plans_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->foreignId('plan_id')->nullable(); - $table->foreignId('user_id')->unique(); - $table->string('last_state')->default('inited'); // requested->paid->started->finished, requested->paid->started->rejected, requested->rejected - $table->timestamp('start_date')->useCurrent(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('chosen_plans'); - } -}; diff --git a/database/migrations/2022_09_12_125818_create_chosen_diets_table.php b/database/migrations/2022_09_12_125818_create_chosen_diets_table.php deleted file mode 100644 index 35b2849..0000000 --- a/database/migrations/2022_09_12_125818_create_chosen_diets_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->foreignId('diet_id')->nullable(); - $table->foreignId('user_id')->unique(); - $table->string('last_state')->default('inited'); // started->finished, started->rejected - $table->timestamp('start_date')->useCurrent(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('chosen_diets'); - } -}; diff --git a/database/migrations/2022_09_12_132727_create_state_history_table.php b/database/migrations/2022_09_12_132727_create_state_history_table.php deleted file mode 100644 index f6e68a9..0000000 --- a/database/migrations/2022_09_12_132727_create_state_history_table.php +++ /dev/null @@ -1,35 +0,0 @@ -increments('id'); - $table->string('transition'); - $table->string('from'); - $table->string('to'); - $table->integer('actor_id')->nullable(); - $table->morphs('statable'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('state_history'); - } -} diff --git a/database/migrations/2022_11_29_082630_create_blog_posts_table.php b/database/migrations/2022_11_29_082630_create_blog_posts_table.php deleted file mode 100644 index 9c1de50..0000000 --- a/database/migrations/2022_11_29_082630_create_blog_posts_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->string('state')->default('archived')->comment('active/archived'); - $table->string('image')->default('')->comment('public path to image'); - $table->text('description'); - $table->string('youtube_url')->default(''); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('blog_posts'); - } -}; diff --git a/database/migrations/2022_11_29_082657_create_recipes_table.php b/database/migrations/2022_11_29_082657_create_recipes_table.php deleted file mode 100644 index 5cb7ab9..0000000 --- a/database/migrations/2022_11_29_082657_create_recipes_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->string('image')->default('')->comment('public path to image'); - $table->string('state')->comment('active/archived'); - $table->integer('cooking_time')->default(0); - $table->json('ingredients'); - $table->text('description'); - $table->json('steps'); - $table->string('youtube_url')->default(''); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('recipes'); - } -}; diff --git a/database/migrations/2022_11_29_090908_create_tags_table.php b/database/migrations/2022_11_29_090908_create_tags_table.php deleted file mode 100644 index e9a3032..0000000 --- a/database/migrations/2022_11_29_090908_create_tags_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('name'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('tags'); - } -}; diff --git a/database/migrations/2022_12_01_094513_create_taggables_table.php b/database/migrations/2022_12_01_094513_create_taggables_table.php deleted file mode 100644 index 053ec3e..0000000 --- a/database/migrations/2022_12_01_094513_create_taggables_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->integer('tag_id'); - $table->morphs('taggable'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('taggables'); - } -}; diff --git a/database/migrations/2022_12_01_120945_blog_post_author.php b/database/migrations/2022_12_01_120945_blog_post_author.php deleted file mode 100644 index f760fdd..0000000 --- a/database/migrations/2022_12_01_120945_blog_post_author.php +++ /dev/null @@ -1,31 +0,0 @@ -bigInteger('user_id'); - $table->bigInteger('blog_post_id'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('blog_post_author'); - } -}; diff --git a/database/migrations/2022_12_01_121006_recipe_author.php b/database/migrations/2022_12_01_121006_recipe_author.php deleted file mode 100644 index 46bc1bc..0000000 --- a/database/migrations/2022_12_01_121006_recipe_author.php +++ /dev/null @@ -1,31 +0,0 @@ -bigInteger('user_id'); - $table->bigInteger('recipe_id'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('recipe_author'); - } -}; diff --git a/database/migrations/2022_12_06_123439_create_blog_post_comments_table.php b/database/migrations/2022_12_06_123439_create_blog_post_comments_table.php deleted file mode 100644 index 1604d1c..0000000 --- a/database/migrations/2022_12_06_123439_create_blog_post_comments_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->bigInteger('user_id'); - $table->bigInteger('blog_post_id'); - $table->smallInteger('grade')->default(0); - $table->longText('body')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('blog_post_comments'); - } -}; diff --git a/database/migrations/2022_12_06_123459_create_blog_post_likes_table.php b/database/migrations/2022_12_06_123459_create_blog_post_likes_table.php deleted file mode 100644 index 7965525..0000000 --- a/database/migrations/2022_12_06_123459_create_blog_post_likes_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->foreignId('blog_post_id'); - $table->foreignId('user_id'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('blog_post_likes'); - } -}; diff --git a/database/migrations/2022_12_06_123516_create_blog_post_comment_upvotes_table.php b/database/migrations/2022_12_06_123516_create_blog_post_comment_upvotes_table.php deleted file mode 100644 index 85ef5a1..0000000 --- a/database/migrations/2022_12_06_123516_create_blog_post_comment_upvotes_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->foreignId('blog_post_comment_id'); - $table->foreignId('user_id'); - $table->string('type')->default('upvote'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('blog_post_comment_upvotes'); - } -}; diff --git a/database/migrations/2022_12_06_124917_create_recipe_comments_table.php b/database/migrations/2022_12_06_124917_create_recipe_comments_table.php deleted file mode 100644 index fac1513..0000000 --- a/database/migrations/2022_12_06_124917_create_recipe_comments_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->bigInteger('user_id'); - $table->bigInteger('recipe_id'); - $table->smallInteger('grade')->default(0); - $table->longText('body')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('recipe_comments'); - } -}; diff --git a/database/migrations/2022_12_06_124931_create_recipe_likes_table.php b/database/migrations/2022_12_06_124931_create_recipe_likes_table.php deleted file mode 100644 index 3ab1466..0000000 --- a/database/migrations/2022_12_06_124931_create_recipe_likes_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->foreignId('recipe_id'); - $table->foreignId('user_id'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('recipe_likes'); - } -}; diff --git a/database/migrations/2022_12_06_124940_create_recipe_comment_upvotes_table.php b/database/migrations/2022_12_06_124940_create_recipe_comment_upvotes_table.php deleted file mode 100644 index d08c804..0000000 --- a/database/migrations/2022_12_06_124940_create_recipe_comment_upvotes_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->foreignId('recipe_comment_id'); - $table->foreignId('user_id'); - $table->string('type')->default('upvote'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('recipe_comment_upvotes'); - } -}; diff --git a/database/migrations/2022_12_07_101359_add_title_to_blog_posts_table.php b/database/migrations/2022_12_07_101359_add_title_to_blog_posts_table.php deleted file mode 100644 index 409dddf..0000000 --- a/database/migrations/2022_12_07_101359_add_title_to_blog_posts_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('title', 512)->default(''); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('blog_posts', function (Blueprint $table) { - $table->dropColumn('title'); - }); - } -}; diff --git a/database/migrations/2022_12_07_101435_add_title_to_recipes_table.php b/database/migrations/2022_12_07_101435_add_title_to_recipes_table.php deleted file mode 100644 index 7e5cb46..0000000 --- a/database/migrations/2022_12_07_101435_add_title_to_recipes_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('title', 512)->default(''); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('recipes', function (Blueprint $table) { - $table->dropColumn('title'); - }); - } -}; diff --git a/database/migrations/2023_01_13_092119_rename_recipe_youtube_url_to_video_url.php b/database/migrations/2023_01_13_092119_rename_recipe_youtube_url_to_video_url.php deleted file mode 100644 index 8d615bc..0000000 --- a/database/migrations/2023_01_13_092119_rename_recipe_youtube_url_to_video_url.php +++ /dev/null @@ -1,32 +0,0 @@ -renameColumn('youtube_url', 'video_url'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('recipes', function (Blueprint $table) { - $table->renameColumn('video_url', 'youtube_url'); - }); - } -}; diff --git a/database/migrations/2023_01_25_073135_add_recipe_type_column.php b/database/migrations/2023_01_25_073135_add_recipe_type_column.php deleted file mode 100644 index 9f1bb65..0000000 --- a/database/migrations/2023_01_25_073135_add_recipe_type_column.php +++ /dev/null @@ -1,32 +0,0 @@ -string('type', 512)->default('unknown'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('recipes', function (Blueprint $table) { - $table->dropColumn('type'); - }); - } -}; diff --git a/database/migrations/2023_02_16_123259_create_chats_table.php b/database/migrations/2023_02_16_123259_create_chats_table.php deleted file mode 100644 index 092391c..0000000 --- a/database/migrations/2023_02_16_123259_create_chats_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->foreignId('from_user_id'); - $table->foreignId('to_user_id'); - $table->text('data'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('chats'); - } -}; diff --git a/database/migrations/2023_07_26_145818_create_product_groups_table.php b/database/migrations/2023_07_26_145818_create_product_groups_table.php deleted file mode 100644 index eda63e4..0000000 --- a/database/migrations/2023_07_26_145818_create_product_groups_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->string('name'); - $table->string('description')->nullable('')->default(''); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('product_groups'); - } -}; diff --git a/database/migrations/2023_07_26_150531_create_product_nutritional_values_table.php b/database/migrations/2023_07_26_150531_create_product_nutritional_values_table.php deleted file mode 100644 index 0a4e630..0000000 --- a/database/migrations/2023_07_26_150531_create_product_nutritional_values_table.php +++ /dev/null @@ -1,45 +0,0 @@ -id(); - $table->string('name')->unique(); - $table->string('image')->nullable()->default(''); - $table->foreignId('product_group_id'); - $table->string('description', 4096); - $table->string('formulations', 4096); - $table->integer('energy_on_100gr'); - $table->float('proteins_on_100gr', 8, 2); - $table->float('fats_on_100gr', 8, 2); - $table->float('carbohydrates_on_100gr', 8, 2); - $table->integer('portion_mass_gr')->nullable(0); - $table->float('energy_on_portion', 8, 2)->nullable(0); - $table->float('proteins_on_portion', 8, 2)->nullable(0); - $table->float('fats_on_portion', 8, 2)->nullable(0); - $table->float('carbohydrates_on_portion', 8, 2)->nullable(0); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('product_nutritional_values'); - } -}; diff --git a/database/migrations/2023_08_23_174247_create_finances_table.php b/database/migrations/2023_08_23_174247_create_finances_table.php deleted file mode 100644 index d611fd7..0000000 --- a/database/migrations/2023_08_23_174247_create_finances_table.php +++ /dev/null @@ -1,31 +0,0 @@ -id(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('finances'); - } -}; diff --git a/database/migrations/2023_08_30_135320_add_height_column_to_user_detailzs.php b/database/migrations/2023_08_30_135320_add_height_column_to_user_detailzs.php deleted file mode 100644 index 4e66ce2..0000000 --- a/database/migrations/2023_08_30_135320_add_height_column_to_user_detailzs.php +++ /dev/null @@ -1,28 +0,0 @@ -integer('height')->comment('user height in centimeters')->default(170)->after('weight'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('user_detailzs', function (Blueprint $table) { - $table->dropColumn('height'); - }); - } -}; diff --git a/database/migrations/2023_09_01_113622_add_fillable_to_table_user_detailz.php b/database/migrations/2023_09_01_113622_add_fillable_to_table_user_detailz.php deleted file mode 100644 index d2baebe..0000000 --- a/database/migrations/2023_09_01_113622_add_fillable_to_table_user_detailz.php +++ /dev/null @@ -1,30 +0,0 @@ -boolean('is_mood_fillable'); - $table->boolean('is_bedtime_fillable'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('user_detailzs', function (Blueprint $table) { - $table->dropColumn('is_mood_fillable'); - $table->dropColumn('is_bedtime_fillable'); - }); - } -}; diff --git a/database/migrations/2023_09_01_152657_add_is_public_to_users.php b/database/migrations/2023_09_01_152657_add_is_public_to_users.php deleted file mode 100644 index 73bec70..0000000 --- a/database/migrations/2023_09_01_152657_add_is_public_to_users.php +++ /dev/null @@ -1,28 +0,0 @@ -boolean('is_public_profile')->default(1)->comment('0 only friends, 1 all'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('is_public_profile'); - }); - } -}; diff --git a/database/migrations/2023_09_14_145239_create_consultant_legal_entities_table.php b/database/migrations/2023_09_14_145239_create_consultant_legal_entities_table.php deleted file mode 100644 index bdc09d7..0000000 --- a/database/migrations/2023_09_14_145239_create_consultant_legal_entities_table.php +++ /dev/null @@ -1,46 +0,0 @@ -id(); - $table->foreignId('user_id')->constrained( - table: 'users', - indexName: 'consultant_legal_entities_user_id' - ); - $table->string('type')->default('selfemployed')->comment('ip|selfemployed|ltd'); - $table->string('inn')->default('')->comment('ИНН'); - $table->string('egrip')->default('')->comment('Номер записи в ЕГРИП для ИП'); - $table->string('ltd_name', 2048)->default('')->comment('Название OOO'); - $table->string('ltd_kpp')->default('')->comment('КПП ООО'); - $table->string('ltd_ogrn')->default('')->comment('ОГРН ООО'); - $table->string('ltd_legal_address', 2048)->default('')->comment('Юридический адрес ООО'); - $table->string('ltd_poste_address', 2048)->default('')->comment('Почтовый адрес ООО'); - $table->string('ltd_okved')->default('')->comment('ОКВЭД ООО'); - $table->string('ltd_ceo_name', 2048)->default('')->comment('ФИО Генерального директора ООО'); - $table->string('bank_account')->default('')->comment('Рассчетный счет'); - $table->string('bank_correspondent_account')->default('')->comment('корреспондентский счет'); - $table->string('bank_bik')->default('')->comment('БИК'); - $table->string('bank_name', 2048)->default('')->comment('Название Банка'); - $table->string('state')->default('published')->comment('published|appruved|cenceled'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('consultant_legal_entities'); - } -}; diff --git a/database/migrations/2023_12_20_105039_add_slug_to_plan.php b/database/migrations/2023_12_20_105039_add_slug_to_plan.php deleted file mode 100644 index 5c48db4..0000000 --- a/database/migrations/2023_12_20_105039_add_slug_to_plan.php +++ /dev/null @@ -1,28 +0,0 @@ -string('slug'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('plans', function (Blueprint $table) { - $table->dropColumn('slug'); - }); - } -}; diff --git a/database/seeders/BlogPostSeeder.php b/database/seeders/BlogPostSeeder.php deleted file mode 100644 index a5e4c02..0000000 --- a/database/seeders/BlogPostSeeder.php +++ /dev/null @@ -1,18 +0,0 @@ -call(PlanSeeder::class); - $this->call(UserSeeder::class); - $this->call(PlanAuthor::class); - $this->call(PlanCommentSeeder::class); - // $this->call(RecipeSeeder::class); - // \App\Models\User::factory(10)->create(); - } -} diff --git a/database/seeders/DietsSeeder.php b/database/seeders/DietsSeeder.php deleted file mode 100644 index c9d4c4e..0000000 --- a/database/seeders/DietsSeeder.php +++ /dev/null @@ -1,23 +0,0 @@ -count(10)->create(); - - $diets->each( - fn ($diet) => $diet->author()->attach(User::inRandomOrder()->first()) - ); - } -} diff --git a/database/seeders/PlanAuthor.php b/database/seeders/PlanAuthor.php deleted file mode 100644 index 1476c61..0000000 --- a/database/seeders/PlanAuthor.php +++ /dev/null @@ -1,25 +0,0 @@ - 0 && Plan::count() > 0) { - Plan::each(function ($plan) { - User::inRandomOrder() - ->first() - ->author_of_plans() - ->attach($plan->id); - }); - } - } -} diff --git a/database/seeders/PlanCommentSeeder.php b/database/seeders/PlanCommentSeeder.php deleted file mode 100755 index 77036ac..0000000 --- a/database/seeders/PlanCommentSeeder.php +++ /dev/null @@ -1,37 +0,0 @@ - 0 && Plan::count() > 0) { - $comments = PlanComment::factory()->count(5)->make(); - - $comments->each(function ($comment) { - $comment->author()->associate( - User::inRandomOrder() - ->first() - ->id - ); - - $comment->plan()->associate( - Plan::inRandomOrder() - ->first() - ->id - ); - - $comment->saveOrFail(); - }); - } - } -} diff --git a/database/seeders/PlanSeeder.php b/database/seeders/PlanSeeder.php deleted file mode 100755 index 5890103..0000000 --- a/database/seeders/PlanSeeder.php +++ /dev/null @@ -1,17 +0,0 @@ -count(10)->create(); - } -} diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php deleted file mode 100644 index 2547948..0000000 --- a/database/seeders/UserSeeder.php +++ /dev/null @@ -1,59 +0,0 @@ -create(); - - $userDetailz = UserDetailz::factory()->make(); - - $userDetailz->user()->associate($user); - - $userDetailz->saveOrFail(); - - }, $this->getListUsers()); - } - - private function getListUsers(): array - { - $allUsersHash = Hash::make('1234567890'); - - return [ - ['id' => 3, 'name' => 'Анчоус Альф', 'email' => 'reshetnick.mike+user1@gmail.com', 'password' => $allUsersHash, 'is_consultant' => true], - ['id' => 4, 'name' => 'Чена Сибаину', 'email' => 'reshetnik.n+user1@gmail.com', 'password' => $allUsersHash, 'is_consultant' => true], - ['id' => 5, 'name' => 'Бруно Бармалей', 'email' => 'reshetnick.mike+user2@gmail.com', 'password' => $allUsersHash, 'is_consultant' => true], - ['id' => 6, 'name' => 'Варенник Васаби', 'email' => 'reshetnick.mike+user3@gmail.com', 'password' => $allUsersHash, 'is_consultant' => true], - ['id' => 7, 'name' => 'Денди Дуглас', 'email' => 'reshetnick.mike+user4@gmail.com', 'password' => $allUsersHash, 'is_consultant' => true], - ['id' => 8, 'name' => 'Ник Радченков', 'email' => 'reshetnik.n+user2@gmail.com', 'password' => $allUsersHash], - ['id' => 9, 'name' => 'Миса Кошка', 'email' => 'reshetnik.n+user3@gmail.com', 'password' => $allUsersHash], - - ['id' => 10, 'name' => 'Ерошка Есаул', 'email' => 'reshetnick.mike+user5@gmail.com', 'password' => $allUsersHash], - ['id' => 11, 'name' => 'Жмурка Живчик', 'email' => 'reshetnick.mike+user6@gmail.com', 'password' => $allUsersHash], - ['id' => 12, 'name' => 'Гошка Картошка', 'email' => 'reshetnik.n+user4@gmail.com', 'password' => $allUsersHash], - ['id' => 13, 'name' => 'Зефир Забияка', 'email' => 'reshetnick.mike+user7@gmail.com', 'password' => $allUsersHash], - ['id' => 14, 'name' => 'Антоша Одуван', 'email' => 'reshetnik.n+user5@gmail.com', 'password' => $allUsersHash], - ['id' => 15, 'name' => 'Кусик Кукусик', 'email' => 'reshetnik.n+user6@gmail.com', 'password' => $allUsersHash], - ['id' => 16, 'name' => 'Косик Кокосик', 'email' => 'reshetnik.n+user7@gmail.com', 'password' => $allUsersHash], - - ['id' => 17, 'name' => 'Хинкалька Вкусная', 'email' => 'reshetnik.n+user8@gmail.com', 'password' => $allUsersHash], - ['id' => 18, 'name' => 'Импульс Йети', 'email' => 'reshetnick.mike+user8@gmail.com', 'password' => $allUsersHash], - ['id' => 19, 'name' => 'Квики Кекс', 'email' => 'reshetnick.mike+user9@gmail.com', 'password' => $allUsersHash], - ['id' => 20, 'name' => 'Чебурек Сочный', 'email' => 'reshetnik.n+user9@gmail.com', 'password' => $allUsersHash], - ['id' => 21, 'name' => 'Клубника Дикая', 'email' => 'reshetnik.n+user10@gmail.com', 'password' => $allUsersHash], - ['id' => 22, 'name' => 'Ляпис Лапша', 'email' => 'reshetnick.mike+user10@gmail.com', 'password' => $allUsersHash], - ['id' => 23, 'name' => 'Друг Парадоксов', 'email' => 'reshetnick.mike+user11@gmail.com', 'password' => $allUsersHash], - ]; - } -}