The `nc-db-new` package provides the foundational database models for the NextUp Comedy website and its associated services. Designed as an internal library, it centralizes the schema definitions, relationships, and often the data access logic for core entities such as Users, Shows, Venues, and Bookings specific to the comedy platform. Currently at version 1.6.7, this package ensures consistent data structures across various backend applications and microservices within the NextUp Comedy ecosystem. Its primary function is to abstract database interactions, enabling developers to work with TypeScript classes or interfaces that map directly to database tables. While its release cadence is tied to internal development cycles, it aims for stability in its minor and patch versions, with breaking changes typically confined to major version bumps. Key differentiators are its highly specialized domain model and its deep integration into the NextUp Comedy tech stack, providing a single source of truth for database schema.
npm install nc-db-newVerified import paths — ran on the pinned version, not inferred.
Demonstrates importing `User` and `Show` models, simulating database operations like creating and finding entities.
Implement robust migration strategies using tools like Flyway, Liquibase, or ORM-specific migration utilities. Validate schema synchronization in CI/CD pipelines.
Review the package's changelog thoroughly for breaking changes. Update your application code, database migrations, and data transformation scripts as necessary to align with the new version.
Ensure the database connection and ORM (if applicable) are correctly initialized and passed to the models, or globally accessible, before attempting any database interactions. Verify connection string, credentials, and pool settings.
Utilize ORM features like `include` or `join` to eager load related data. Analyze query performance using database monitoring tools and refactor data access patterns to reduce redundant queries.
Ensure `db` and models are correctly imported and initialized. Verify that the database connection is established and the ORM instance is available where models are being used.
Update your model definitions in `nc-db-new` if `someField` is new. If it's an existing field, ensure your query explicitly selects it, or that the return type of your query includes it.
Review your model's create/update data to ensure all required fields (especially `NOT NULL` columns) are provided with valid values.
No dependency data recorded yet.