encore-database

Automate Encore.ts SQLDatabase setup, migrations, and Drizzle ORM integration.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Ottric/LINE-DEV-LAB-V2 --skill encore-database-ottric
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: encore-database
Source: https://github.com/Ottric/LINE-DEV-LAB-V2/tree/main/apps/services/.agents/skills/encore-database
Command: npx skills add https://github.com/Ottric/LINE-DEV-LAB-V2 --skill encore-database-ottric

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines Encore.ts database work by providing a cohesive approach to configure and use SQL databases, migrations, and ORM integrations across services.

Core Features & Use Cases

  • SQLDatabase setup with migrations to manage schema lifecycle
  • Typed query methods (query, queryAll, queryRow, exec) for safe and predictable data access
  • Cross-service database sharing via SQLDatabase.named() for shared resources
  • Drizzle ORM integration for type-safe queries and migrations
  • SQL injection protection through template literals and parameterization

Quick Start

Instantiate SQLDatabase with a database name and migrations path, then wire up Drizzle ORM to begin using Encore.ts database features.

Frequently Asked Questions about encore-database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure SQLDatabase setup and manage migrations in Encore.ts?

Configure SQLDatabase setup in Encore.ts by instantiating SQLDatabase with a database name and migrations path to manage the schema lifecycle. This wires up Drizzle ORM integration and enables typed query methods for predictable data access.

Can I use Drizzle ORM with Encore.ts for type-safe database queries?

Yes, Drizzle ORM integrates with Encore.ts to provide type-safe database queries and migrations. It enables typed query methods like query, queryAll, queryRow, and exec for safe and predictable data access.

What is the best way to share a SQL database across multiple Encore.ts services?

Use SQLDatabase.named() to share a SQL database across multiple Encore.ts services. This cross-service database sharing approach allows backend services to reliably access shared database resources.

Does Encore.ts SQLDatabase protect against SQL injection during database queries?

Encore.ts SQLDatabase protects against SQL injection during database queries through template literals and parameterization. This mechanism ensures safe and predictable data access when executing SQL operations.

What typed query methods are available for SQL database operations in Encore.ts?

Typed query methods available for SQL database operations in Encore.ts include query, queryAll, queryRow, and exec. These methods provide safe and predictable data access when interacting with your configured SQLDatabase.