Files
ApplianceRepair/Migrations/20260424050555_InitialCreate.cs

126 lines
5.6 KiB
C#
Raw Normal View History

2026-04-25 13:14:08 -05:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ApplianceRepair.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "BusinessConfig",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
Name = table.Column<string>(type: "TEXT", nullable: true),
PhoneNumber = table.Column<string>(type: "TEXT", nullable: true),
SupportEmail = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_BusinessConfig", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ContentCards",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
BelongsToPage = table.Column<string>(type: "TEXT", nullable: true),
Group = table.Column<string>(type: "TEXT", nullable: true),
Header = table.Column<string>(type: "TEXT", nullable: true),
Text = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ContentCards", x => x.Id);
});
migrationBuilder.CreateTable(
name: "HomePage",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
HeaderLine1 = table.Column<string>(type: "TEXT", nullable: true),
HeaderLine2 = table.Column<string>(type: "TEXT", nullable: true),
HeaderText = table.Column<string>(type: "TEXT", nullable: true),
CallHeaderText = table.Column<string>(type: "TEXT", nullable: true),
BookHeaderText = table.Column<string>(type: "TEXT", nullable: true),
SecondaryHeaderText = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_HomePage", x => x.Id);
});
migrationBuilder.CreateTable(
name: "RepairRequestMedia",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
RequestNumber = table.Column<string>(type: "TEXT", nullable: true),
MediaPath = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_RepairRequestMedia", x => x.Id);
});
migrationBuilder.CreateTable(
name: "RepairRequests",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
RequestNumber = table.Column<string>(type: "TEXT", nullable: true),
Type = table.Column<string>(type: "TEXT", nullable: true),
Brand = table.Column<string>(type: "TEXT", nullable: true),
Notes = table.Column<string>(type: "TEXT", nullable: true),
Name = table.Column<string>(type: "TEXT", nullable: true),
Phone = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_RepairRequests", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "BusinessConfig");
migrationBuilder.DropTable(
name: "ContentCards");
migrationBuilder.DropTable(
name: "HomePage");
migrationBuilder.DropTable(
name: "RepairRequestMedia");
migrationBuilder.DropTable(
name: "RepairRequests");
}
}
}