feat: implement dispensing module with transaction-safe stock management, FEFO allocation, and H1 compliance reporting
This commit is contained in:
+3
-2
@@ -6,8 +6,9 @@ const pool = new Pool({
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
await pool.query('ALTER TABLE dispensing_records ADD COLUMN IF NOT EXISTS prescription_id VARCHAR(50)');
|
||||
console.log('Successfully added prescription_id column.');
|
||||
await pool.query('ALTER TABLE stock_movements ADD COLUMN IF NOT EXISTS reason_code VARCHAR(100)');
|
||||
await pool.query('ALTER TABLE stock_movements ADD COLUMN IF NOT EXISTS notes TEXT');
|
||||
console.log('Successfully added columns.');
|
||||
} catch (err) {
|
||||
console.error('Error:', err);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user