mirror of
https://github.com/soconnor0919/hristudio.git
synced 2025-12-12 07:04:44 -05:00
fix: update user fields to match schema
- Replace firstName/lastName with name field in users API route - Update user formatting in UsersTab component - Add email fallback when name is not available
This commit is contained in:
@@ -7,16 +7,9 @@ config({ path: '.env.local' });
|
||||
|
||||
async function dropAllTables() {
|
||||
try {
|
||||
// drop all tables, regardless of name
|
||||
await sql`
|
||||
DROP TABLE IF EXISTS
|
||||
user_roles,
|
||||
role_permissions,
|
||||
permissions,
|
||||
roles,
|
||||
participant,
|
||||
study,
|
||||
users
|
||||
CASCADE;
|
||||
DROP TABLE IF EXISTS ${sql.raw(Object.values(tables).map(table => table.name).join(', '))}
|
||||
`;
|
||||
console.log('All tables dropped successfully');
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user