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>
This commit is contained in:
parent
2592bfe305
commit
349eafbe62
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
Loading…
Reference in New Issue
Block a user