using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Functions.Data.DB.Migrations { /// public partial class Function3 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "EnvironmentVariables", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), Key = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Value = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), FunctionId = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_EnvironmentVariables", x => x.Id); table.ForeignKey( name: "FK_EnvironmentVariables_Functions_FunctionId", column: x => x.FunctionId, principalTable: "Functions", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_EnvironmentVariables_FunctionId", table: "EnvironmentVariables", column: "FunctionId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "EnvironmentVariables"); } } }