24 lines
607 B
TypeScript
24 lines
607 B
TypeScript
|
|
import { db } from './src/config/database';
|
|
|
|
async function check() {
|
|
try {
|
|
const id = 1;
|
|
console.log('Testing update on ID:', id);
|
|
|
|
// 1. Update to TRUE
|
|
console.log('Updating hide_partner_name to TRUE...');
|
|
await db('benefits').where({ id }).update({ hide_partner_name: true });
|
|
|
|
let row = await db('benefits').where({ id }).first();
|
|
console.log('After TRUE update:', row.hide_partner_name, typeof row.hide_partner_name);
|
|
|
|
process.exit(0);
|
|
} catch (e) {
|
|
console.error('Error:', e);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
check();
|