fix: Implement empty AddVariantCollectionsAndSalesLedger migration
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

- 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>
This commit is contained in:
sysadmin 2025-11-18 15:41:24 +00:00
parent 2592bfe305
commit 349eafbe62
2 changed files with 26 additions and 0 deletions

View File

@ -10,13 +10,31 @@ namespace LittleShop.Migrations
/// <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");
}
}
}

View File

@ -0,0 +1,8 @@
-- Migration: Fix Variant Columns for Products
-- Date: 2025-09-28
-- Description: Adds missing VariantCollectionId and VariantsJson columns to Products table
-- This fixes the empty AddVariantCollectionsAndSalesLedger migration
-- Add variant columns to Products table
ALTER TABLE Products ADD COLUMN VariantCollectionId TEXT NULL;
ALTER TABLE Products ADD COLUMN VariantsJson TEXT NULL;