MIC.Infrastructure.Data

Configure SQLite or PostgreSQL database providers with automatic migrations during startup.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/gpopzrawproduction-afk/MbarieInsightSuite --skill mic-infrastructure-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: MIC.Infrastructure.Data
Source: https://github.com/gpopzrawproduction-afk/MbarieInsightSuite/tree/main/MIC.Infrastructure.Data
Command: npx skills add https://github.com/gpopzrawproduction-afk/MbarieInsightSuite --skill mic-infrastructure-data

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Microsoft.EntityFrameworkCore, Microsoft.Extensions.Configuration, Microsoft.Extensions.DependencyInjection, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive data infrastructure setup accommodating multiple database backends.

Core Features & Use Cases

  • Database Provider Detection: Automatically identifies whether to use SQLite or PostgreSQL based on configuration.
  • Flexible Configuration: Supports environment variables, appsettings.json, or explicit connection strings.
  • Migration & Initialization: Handles automatic migrations, database creation, and backup before updates.
  • Use Case: Deploying a scalable application environment that switches seamlessly between local development and production databases without manual changes.

Quick Start

Configure environment variables or JSON settings to specify your database connection, then load the dependency injection to establish the correct context.

Frequently Asked Questions about MIC.Infrastructure.Data

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

FAQPage Schema
How do I configure Entity Framework Core to switch between SQLite and PostgreSQL automatically?

To configure Entity Framework Core database provider detection, set environment variables or appsettings.json connection strings so the infrastructure automatically selects SQLite or PostgreSQL based on the current environment configuration.

What is the best way to automate database migrations during application startup?

Automating database migrations during startup involves loading dependency injection to establish the correct context, which then handles automatic migrations, database creation, and backup operations before applying updates.

Can I use environment variables for database connection handling in a scalable application?

Yes, you can use environment variables for database connection handling, as the configuration system explicitly supports them alongside appsettings.json or explicit connection strings to establish flexible environment-sensitive setups.

Do I need Microsoft.Extensions.DependencyInjection to manage database context setup?

Yes, you need Microsoft.Extensions.DependencyInjection to load the database context setup, as it registers the correct context and ensures reliable connection handling during application startup.

How do I back up a database before running migrations in a local development environment?

To back up a database before running migrations, the infrastructure automatically handles backup creation before updates, ensuring your local SQLite or production PostgreSQL data is protected during schema changes.