database-sqlite

Manage SQLite connections and run idempotent schema migrations for PolyFlup.

18|3|Updated Jan 2, 2026
One-click install
npx skills add https://github.com/Niller2005/PolyFlup --skill database-sqlite
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-sqlite
Source: https://github.com/Niller2005/PolyFlup/tree/main/.opencode/skill/database-sqlite
Command: npx skills add https://github.com/Niller2005/PolyFlup --skill database-sqlite

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SQLite usage for PolyFlup is made reliable through standardized connection handling, transactional safety, and a migration system to evolve the schema without data loss.

Core Features & Use Cases

  • db_connection context manager provides safe, automatic commits and clean error handling for read/write operations.
  • Idempotent migrations and versioned schema ensure safe upgrades without data loss and clear history.
  • WAL mode enables better concurrency and performance by allowing readers and writers to proceed in parallel.
  • Schema visibility and guidance includes a clear overview of core tables and fields to support maintainable data access.
  • Migration history and auditing tracks applied migrations for accountability and rollback planning.

Quick Start

Set up the db_connection context in your data layer and run the migration tool to initialize or upgrade the schema.

Frequently Asked Questions about database-sqlite

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

FAQPage Schema
How do I manage SQLite database connections in Python safely?

Manage SQLite database connections in Python safely using a context-managed connection system that wraps read and write operations. This approach ensures automatic transaction commits on success and clean error handling during failures, preventing partial data writes.

How do I handle SQLite schema migrations without losing data?

Handle SQLite schema migrations without losing data by applying idempotent migration scripts tracked through a versioned schema history. This ensures safe upgrades and maintains clear migration history for accountability and rollback planning.

Does enabling WAL mode improve SQLite performance for concurrent read and write operations?

Enabling WAL mode improves SQLite performance by allowing concurrent readers and writers to proceed in parallel. This write-ahead logging configuration prevents reader/writer blocking and is ideal for production deployments with mixed database access.

What is the best way to track SQLite schema versioning in a local database?

The best way to track SQLite schema versioning is by maintaining a versioned schema history table that records applied migrations. This auditing approach tracks each schema change, providing accountability and a reliable reference for rollback planning.

Why do my SQLite database writes fail when concurrent operations occur?

SQLite database writes fail during concurrent operations when the default journal mode locks the database. Enabling WAL mode allows readers and writers to proceed in parallel, resolving lock contention and improving concurrency in production environments.

Can I use context managers for SQLite connection handling in a Python trading bot?

You can use context managers for SQLite connection handling in a Python trading bot to ensure transactional safety. The context manager automatically commits successful transactions and handles errors, securing data integrity during local database operations.