update context API
All checks were successful
Deploy to Production / deploy (push) Successful in 19s
All checks were successful
Deploy to Production / deploy (push) Successful in 19s
This commit is contained in:
18
cleanup-context.js
Normal file
18
cleanup-context.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const {sequelize} = require('./config/database');
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
await sequelize.authenticate();
|
||||
await sequelize.query('ALTER TABLE context DROP COLUMN is_prompt, DROP COLUMN is_list, DROP COLUMN is_approve');
|
||||
console.log('✅ Dropped old columns');
|
||||
|
||||
const [cols] = await sequelize.query('DESCRIBE context');
|
||||
console.log('\n📊 Final Context table:');
|
||||
cols.forEach(c => console.log(` ${c.Field} (${c.Type})`));
|
||||
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('Error:', error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user