jensovic/dbmysync-addin
最新稳定版本:v1.0.0
Composer 安装命令:
composer require jensovic/dbmysync-addin
包简介
Database synchronization endpoint - Provides REST API to expose MySQL database structure and keys for comparison
README 文档
README
Database synchronization endpoint for MySQL databases.
Installation
composer require jensovic/dbmysync-addin
Usage
1. Create endpoint in your project
<?php require_once 'vendor/autoload.php'; use Jensovic\DbMySyncAddin\Endpoint; $config = [ 'db_host' => 'localhost', 'db_name' => 'your_database', 'db_user' => 'your_user', 'db_pass' => 'your_password', 'secret' => 'your-secret-key-here' ]; $endpoint = new Endpoint($config); $endpoint->handle();
2. API Endpoints
All requests require X-DbSync-Secret header with your secret key.
Health Check
GET /endpoint.php?action=health
Get all tables schema
GET /endpoint.php?action=schema
Get specific table schema
GET /endpoint.php?action=schema&table=users
Response Format
{
"success": true,
"data": {
"tables": [
{
"name": "users",
"columns": [...],
"primary_keys": [...],
"foreign_keys": [...],
"indexes": [...]
}
]
}
}
License
MIT
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-06