jensovic/dbmysync-addin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-06