70 lines
		
	
	
		
			No EOL
		
	
	
		
			3.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
		
			No EOL
		
	
	
		
			3.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Microsoft.EntityFrameworkCore.Migrations;
 | |
| 
 | |
| #nullable disable
 | |
| 
 | |
| namespace turf_tasker.Migrations
 | |
| {
 | |
| public partial class SeedBermudaTips : Migration
 | |
|     {
 | |
|         protected override void Up(MigrationBuilder migrationBuilder)
 | |
|         {
 | |
|             // Seed data for LawnCareTips
 | |
|             migrationBuilder.InsertData(
 | |
|                 table: "LawnCareTips",
 | |
|                 columns: new[] { "Id", "Title", "Category", "Content" },
 | |
|                 values: new object[,]
 | |
|                 {
 | |
|                     { 1, "Bermuda Mowing Height", 0, "For Bermuda grass in Oklahoma, mow at a height of 1-2 inches for optimal density and health during peak season." },
 | |
|                     { 2, "Bermuda Mowing Frequency", 0, "During peak growing season (late spring/summer), mow Bermuda grass every 3-5 days. Frequent mowing prevents scalping." },
 | |
|                     { 3, "Bermuda Watering - Deep & Infrequent", 1, "Water Bermuda grass deeply (1-1.5 inches) once or twice a week, rather than frequent, shallow watering. Water in the early morning." },
 | |
|                     { 4, "Bermuda Spring Fertilization", 2, "Apply a nitrogen-heavy fertilizer in late spring (May/June) after Bermuda grass has fully greened up and soil temperatures are consistently above 65°F (18°C)." },
 | |
|                     { 5, "Bermuda Summer Fertilization", 2, "A second application of nitrogen fertilizer in mid-summer (July/August) can further promote vigorous growth for Bermuda grass." },
 | |
|                     { 6, "Pre-Emergent Weed Control", 3, "Apply a pre-emergent herbicide for summer annual weeds like crabgrass in early spring (March-April) before soil temperatures consistently reach 50-55°F (10-13°C) in Oklahoma." },
 | |
|                     { 7, "Post-Emergent Weed Control", 3, "Treat broadleaf weeds in Bermuda grass as needed throughout the growing season with a selective post-emergent herbicide. Always follow product instructions carefully." },
 | |
|                     { 8, "Aeration for Bermuda", 4, "Aerate Bermuda grass in late spring to early summer when it's actively growing. This helps reduce compaction and improve nutrient absorption." },
 | |
|                     { 9, "Bermuda Winter Dormancy", 5, "Bermuda grass will go dormant and turn brown in winter; this is normal. Avoid heavy foot traffic when it is dormant to prevent damage." }
 | |
|                 });
 | |
|         }
 | |
| 
 | |
|         protected override void Down(MigrationBuilder migrationBuilder)
 | |
|         {
 | |
|             // Remove the seeded data if the migration is reverted
 | |
|             migrationBuilder.DeleteData(
 | |
|                 table: "LawnCareTips",
 | |
|                 keyColumn: "Id",
 | |
|                 keyValue: 1);
 | |
|             migrationBuilder.DeleteData(
 | |
|                 table: "LawnCareTips",
 | |
|                 keyColumn: "Id",
 | |
|                 keyValue: 2);
 | |
|             migrationBuilder.DeleteData(
 | |
|                 table: "LawnCareTips",
 | |
|                 keyColumn: "Id",
 | |
|                 keyValue: 3);
 | |
|             migrationBuilder.DeleteData(
 | |
|                 table: "LawnCareTips",
 | |
|                 keyColumn: "Id",
 | |
|                 keyValue: 4);
 | |
|             migrationBuilder.DeleteData(
 | |
|                 table: "LawnCareTips",
 | |
|                 keyColumn: "Id",
 | |
|                 keyValue: 5);
 | |
|             migrationBuilder.DeleteData(
 | |
|                 table: "LawnCareTips",
 | |
|                 keyColumn: "Id",
 | |
|                 keyValue: 6);
 | |
|             migrationBuilder.DeleteData(
 | |
|                 table: "LawnCareTips",
 | |
|                 keyColumn: "Id",
 | |
|                 keyValue: 7);
 | |
|             migrationBuilder.DeleteData(
 | |
|                 table: "LawnCareTips",
 | |
|                 keyColumn: "Id",
 | |
|                 keyValue: 8);
 | |
|             migrationBuilder.DeleteData(
 | |
|                 table: "LawnCareTips",
 | |
|                 keyColumn: "Id",
 | |
|                 keyValue: 9);
 | |
|         }
 | |
|     }
 | |
| } | 
