No description available
pip install fastpluggy-sql-migration
pip install fastpluggy-sql-migration==0.1.1
This module provides a simple SQL-based migration system for plugins in the FastPluggy framework.
Each plugin can manage its own set of .sql
migration files independently, with version tracking and isolated execution.
migrations/
folder.sql
files — Files are sorted and executed in version order.sql
migration runs in its own transactionplugins/
├── <plugin_name>/
│ └── migrations/
│ ├── 0001_create_posts_table.sql
│ ├── 0002_add_index_to_title.sql
│ └── ...
Files should be named with a numeric prefix for ordering.
TODO: install the plugin
Run this once in your main database:
CREATE TABLE IF NOT EXISTS plugin_migrations (
plugin_name TEXT NOT NULL,
version TEXT NOT NULL,
applied_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (plugin_name, version)
);
from fastpluggy_migrations import run_sql_migrations
from sqlalchemy import create_engine
from pathlib import Path
engine = create_engine("sqlite:///main.db")
run_sql_migrations(
plugin_name="blog",
engine=engine,
migration_path=Path("plugins/blog/migrations")
)
python manage.py migrate --plugin blog
.sql
files with numeric order.sql
execution.down.sql
support for developmentmigrate all
or migrate plugin-name
Dashboard
System Overview: Stats cards showing total plugins, pending/applied/failed migrations
Recent Activity Feed: Real-time view of latest migration executions
Quick Actions: One-click button to run all pending migrations
Plugin Management
Plugin Status Table: Shows each plugin's version, status, and migration progress
Visual Progress Bars: Clear indication of applied vs pending migrations
Action Menus: Manage, view details, run migrations, or disable plugins
Status Badges: Color-coded indicators (Active, Failed, Pending)
Migration Management
Per-Plugin Cards: Organized view of migrations by plugin
File-Level Status: Individual migration files with timestamps
Execution Controls: Retry failed migrations, run pending ones
Visual Status Indicators: Green (applied), red (failed), yellow (pending)
Migration Logs
Execution History: Detailed table of all migration runs
Log Details Modal: Full execution logs with SQL commands and timing
Search & Filter: Find specific migrations or filter by status
Export Functionality: Download logs for analysis
🎨 Design Highlights:
Modern Interface: Clean, professional Tabler.io styling
Responsive Layout: Works on desktop, tablet, and mobile
Intuitive Navigation: Clear sidebar with section-based organization
Status-Driven UI: Color coding and icons for quick status recognition
Action-Oriented: Context-appropriate buttons and controls
MIT License.
Copyright (c) 2025.
Feel free to open issues or PRs to improve functionality.
Let’s build a solid, plugin-friendly migration ecosystem together!
This plugin does not have a Changelog file or it could not be extracted from the package.
API documentation for this plugin is not available.
Last analysis performed: 2025-07-24 13:46:30
This plugin has a valid entry point:
sql_migration
= fastpluggy_plugin.sql_migration.plugin:SqlMigrationPlugin
Issues were found during analysis, but details are not available.