Fork from QuoteForge → PriceForge
Renamed module path git.mchus.pro/mchus/quoteforge → git.mchus.pro/mchus/priceforge, renamed package quoteforge → priceforge, moved binary from cmd/qfs to cmd/pfs.
This commit is contained in:
11
migrations/001_add_lot_category.sql
Normal file
11
migrations/001_add_lot_category.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Migration: Add lot_category column to lot table
|
||||
-- Run this migration manually on the database
|
||||
|
||||
-- Add lot_category column to lot table
|
||||
ALTER TABLE lot ADD COLUMN lot_category VARCHAR(50) DEFAULT NULL;
|
||||
|
||||
-- Create index for faster lookups
|
||||
CREATE INDEX idx_lot_category ON lot(lot_category);
|
||||
|
||||
-- Update existing lots: extract category from lot_name (first part before underscore)
|
||||
UPDATE lot SET lot_category = SUBSTRING_INDEX(lot_name, '_', 1) WHERE lot_category IS NULL;
|
||||
Reference in New Issue
Block a user