littleshop/LittleShop/Migrations/20250928014850_AddVariantCollectionsAndSalesLedger.cs
sysadmin 349eafbe62
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 1m1s
fix: Implement empty AddVariantCollectionsAndSalesLedger migration
- Added VariantCollectionId and VariantsJson columns to Products table
- Migration was previously empty causing schema mismatch on startup
- Fixes "SQLite Error 1: 'no such column: p.VariantCollectionId'"

The migration file was scaffolded but never implemented, causing production
deployments to fail with database schema errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 15:41:24 +00:00

41 lines
1.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LittleShop.Migrations
{
/// <inheritdoc />
public partial class AddVariantCollectionsAndSalesLedger : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
// Add variant columns to Products table
migrationBuilder.AddColumn<Guid?>(
name: "VariantCollectionId",
table: "Products",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "VariantsJson",
table: "Products",
type: "TEXT",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
// Remove variant columns from Products table
migrationBuilder.DropColumn(
name: "VariantCollectionId",
table: "Products");
migrationBuilder.DropColumn(
name: "VariantsJson",
table: "Products");
}
}
}