feat: inicializar repositorio oficial do clube67.com
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
|
||||
import { db } from './src/config/database';
|
||||
|
||||
async function check() {
|
||||
try {
|
||||
const id = 1; // Assuming ID 1 exists from previous run
|
||||
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);
|
||||
|
||||
// 2. Update to FALSE
|
||||
console.log('Updating hide_partner_name to FALSE...');
|
||||
await db('benefits').where({ id }).update({ hide_partner_name: false });
|
||||
|
||||
row = await db('benefits').where({ id }).first();
|
||||
console.log('After FALSE update:', row.hide_partner_name, typeof row.hide_partner_name);
|
||||
|
||||
process.exit(0);
|
||||
} catch (e) {
|
||||
console.error('Error:', e);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
check();
|
||||
Reference in New Issue
Block a user