using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace CocktailWeb.Migrations
{
    /// <inheritdoc />
    public partial class ModifyFlascheAddGlas : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<bool>(
                name: "Alkoholisch",
                table: "Flaschen",
                type: "INTEGER",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<string>(
                name: "ImageURL",
                table: "Flaschen",
                type: "TEXT",
                nullable: true);

            migrationBuilder.CreateTable(
                name: "Glaeser",
                columns: table => new
                {
                    Id = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    Fuellmenge = table.Column<int>(type: "INTEGER", nullable: false),
                    ImageURL = table.Column<string>(type: "TEXT", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Glaeser", x => x.Id);
                });

            migrationBuilder.UpdateData(
                table: "Flaschen",
                keyColumn: "Id",
                keyValue: 1,
                columns: new[] { "Alkoholisch", "ImageURL" },
                values: new object[] { true, null });

            migrationBuilder.UpdateData(
                table: "Flaschen",
                keyColumn: "Id",
                keyValue: 2,
                columns: new[] { "Alkoholisch", "ImageURL" },
                values: new object[] { true, null });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Glaeser");

            migrationBuilder.DropColumn(
                name: "Alkoholisch",
                table: "Flaschen");

            migrationBuilder.DropColumn(
                name: "ImageURL",
                table: "Flaschen");
        }
    }
}
