BEGIN;

ALTER TABLE adjustment_stocks
ADD COLUMN adj_number VARCHAR(255);

UPDATE adjustment_stocks
SET adj_number = CONCAT('ADJ-', LPAD(id::text, 5, '0'))
WHERE adj_number IS NULL;

COMMIT;
