Viewing Database Data in Supabase
Quick Access
- Go to Supabase Dashboard: https://supabase.com/dashboard
- Select your project: petunia (jwgdiwhuulaxzfajogfb)
- Click "Table Editor" in left sidebar (database icon)
Viewing Different Tables
View Users (you already know this)
- Click "Authentication" → "Users" in sidebar
- Shows email, created date, last sign in
- BUT: Does NOT show onboarding status, role, etc.
View Full User Data (with onboarding, role, etc.)
- Click "Table Editor"
- Select "User" table from dropdown
- You'll see ALL fields: email, name, role, onboardingCompleted, etc.
View Portals (where PIDs live)
- Click "Table Editor"
- Select "Portal" table from dropdown
- Columns you'll see:
id- Internal UUIDpetuniaID- This is the PID! (e.g.,PID-DEMO-001)name- Portal name (e.g., "Demo Company")isDemoPortal- Boolean flagstatus- active/inactivecreatedAt,updatedAt
View User-Portal Access (who has access to which portals)
- Click "Table Editor"
- Select "UserPortalAccess" table
- Shows: userId, portalId, role (owner/admin/user)
View Admins (platform admin vs demo admin)
- Click "Table Editor"
- Select "Admin" table
- Shows: userId, isPlatformAdmin, isDemoAdmin
Running SQL Queries (Advanced)
- Click "SQL Editor" in left sidebar
- Click "+ New query"
- Example queries:
-- View all portals with their PIDs
SELECT "petuniaID", name, "isDemoPortal", status
FROM "Portal";
-- View all users with their portals
SELECT
u.email,
u.role,
u."onboardingCompleted",
p."petuniaID",
p.name as portal_name,
upa.role as portal_role
FROM "User" u
LEFT JOIN "UserPortalAccess" upa ON u.id = upa."userId"
LEFT JOIN "Portal" p ON upa."portalId" = p.id;
-- View demo portal details
SELECT * FROM "Portal" WHERE "petuniaID" = 'PID-DEMO-001';
Quick Reference: Table Names
| What You Want to See | Table Name | Key Fields |
|---|---|---|
| Users (basic) | Authentication → Users | email, created_at |
| Users (full details) | User | email, role, onboardingCompleted |
| Portals & PIDs | Portal | petuniaID, name, isDemoPortal |
| User Portal Access | UserPortalAccess | userId, portalId, role |
| Admin Flags | Admin | userId, isPlatformAdmin, isDemoAdmin |
| Companies | Company | name |
| Clients (legacy) | Client | name, petId |
Current Database State
After running the seed script, you should see:
Users (2):
- admin@example.com
- demo@example.com
Portals (1 by default):
- Demo Company (PID:
PID-DEMO-001) ← Demo portal
Need additional QA tenants for a disposable environment? Create them manually after running the default seed (or maintain a separate helper script) so the canonical seed continues to provision Demo Company only.
Troubleshooting
Can't see a table?
- Make sure you're in "Table Editor" not "Authentication"
- Table names are case-sensitive in PostgreSQL
- Use double quotes in SQL:
"Portal"notPortal
PIDs not showing?
- PIDs are in the
petuniaIDcolumn in thePortaltable - They're stored as TEXT (strings), not numbers