chore: atualizacao dos scripts de delecao de OFs concluidas e auditoria concluida

This commit is contained in:
2026-08-13 13:11:37 +00:00
parent dc20985524
commit 7f810f2b77
6 changed files with 152 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
import { createClient } from '@supabase/supabase-js';
const supabaseUrl = 'https://supabase.reifonas.cloud';
const supabaseKey = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJzdXBhYmFzZSIsImlhdCI6MTc3Mjk5NTUwMCwiZXhwIjo0OTI4NjY5MTAwLCJyb2xlIjoic2VydmljZV9yb2xlIn0._n2Kj2f29z1u0pOYUGqAr-1Xjt-xQpK9KDhhhGvOIro';
const sbERP = createClient(supabaseUrl, supabaseKey, { db: { schema: 'TS_ERP' } });
async function run() {
const tables = ['ordens_fabricacao', 'pecas', 'apontamentos_producao'];
for (let table of tables) {
let res = await sbERP.from(table).select('*', { count: 'exact', head: true });
console.log(`TS_ERP.${table}:`, res.count, res.error ? res.error.message : 'OK');
}
}
run();