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.
16 lines
479 B
SQL
16 lines
479 B
SQL
ALTER TABLE qt_pricelists
|
|
ADD COLUMN IF NOT EXISTS source ENUM('estimate', 'warehouse', 'competitor') NOT NULL DEFAULT 'estimate' AFTER id;
|
|
|
|
UPDATE qt_pricelists
|
|
SET source = 'estimate'
|
|
WHERE source IS NULL OR source = '';
|
|
|
|
ALTER TABLE qt_pricelists
|
|
DROP INDEX IF EXISTS idx_qt_pricelists_version;
|
|
|
|
CREATE UNIQUE INDEX idx_qt_pricelists_source_version
|
|
ON qt_pricelists(source, version);
|
|
|
|
CREATE INDEX idx_qt_pricelists_source_created_at
|
|
ON qt_pricelists(source, created_at);
|