feat: implement dispensing module with transaction-safe stock management, FEFO allocation, and H1 compliance reporting
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const { Client } = require('pg');
|
||||
const client = new Client('postgres://postgres:csh%402018@localhost:5432/ai_pharmacy');
|
||||
client.connect().then(async () => {
|
||||
try {
|
||||
await client.query("ALTER TABLE products ADD COLUMN pack_size INTEGER DEFAULT 1;");
|
||||
console.log('Added pack_size column to products table.');
|
||||
} catch (err) {
|
||||
if (err.code === '42701') {
|
||||
console.log('pack_size column already exists.');
|
||||
} else {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
process.exit(0);
|
||||
}).catch(console.error);
|
||||
Reference in New Issue
Block a user