-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinspect_columns.js
More file actions
29 lines (20 loc) · 1.51 KB
/
inspect_columns.js
File metadata and controls
29 lines (20 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { createClient } from '@supabase/supabase-js';
const SUPABASE_URL = process.env.VITE_SUPABASE_URL || "https://vawouugtzwmejxqkeqqj.supabase.co";
const SUPABASE_KEY = process.env.VITE_SUPABASE_PUBLISHABLE_KEY || "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZhd291dWd0endtZWp4cWtlcXFqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTI3Njk3MTIsImV4cCI6MjA2ODM0NTcxMn0.qtZk3zk5RMqzlPNhxCkTM6fyVQX5ULGt7nna_XOUr00";
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
async function inspectColumns() {
console.log('Fetching columns for superduper_execution_log...');
// We can't query information_schema directly via supabase-js easily unless exposed.
// Instead, let's try to query the table with `.select('*').limit(0)` which usually works to get structure if typed, but raw JS client returns strict data.
// Actually, let's try to infer from the error of selecting a non-existent column, but we already got the error.
// Use a known method: try to select specific columns we EXPECT and see which one fails, or just assume the error "task_id does not exist" is true.
// The error was explicit.
console.log('Fetching columns for tasks...');
// We saw keys earlier: assigned_agent_id is likely the one.
// Let's verify by just printing a task again.
const { data: tasks } = await supabase.from('tasks').select('*').limit(1);
if (tasks && tasks.length) {
console.log('Task Keys:', Object.keys(tasks[0]));
}
}
inspectColumns();