Skip to content

[feature] Allow Custom / Generated Schema for Evlog NuxtHub Adapter #273

@tahirmahmudzade

Description

@tahirmahmudzade

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:

npx evlog generate

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions