Description
The current @evlog/nuxthub adapter automatically registers its database schema via NuxtHub/Nitro hooks, creating the evlog_events table without exposing or allowing modification.
While this works well for zero-config setups, it limits integration with existing database schemas in real-world applications.
Schema is not user-controlled or generated locally
Because the schema is auto-injected via hooks, developers cannot:
- Add relational fields (e.g.,
user_id)
- Create foreign key relationships (e.g., logs → users)
- Extend the schema with custom columns
- Modify indexes or constraints
Proposed Solution
Introduce a schema generation or opt-out approach, similar to tools like Better Auth.
Provide a CLI command:
This would:
- Generate SQL / schema files locally
- Allow developers to:
- Review
- Modify
- Add relationships
- Apply schema via migrations
But this would require having a specific CLI for evlog which might be hard to implement.
Description
The current
@evlog/nuxthubadapter automatically registers its database schema via NuxtHub/Nitro hooks, creating theevlog_eventstable without exposing or allowing modification.While this works well for zero-config setups, it limits integration with existing database schemas in real-world applications.
Schema is not user-controlled or generated locally
Because the schema is auto-injected via hooks, developers cannot:
user_id)Proposed Solution
Introduce a schema generation or opt-out approach, similar to tools like Better Auth.
Provide a CLI command:
This would:
But this would require having a specific CLI for evlog which might be hard to implement.