{"id":16939141,"url":"https://github.com/vnpy/vnpy_mysql","last_synced_at":"2025-07-25T11:38:58.295Z","repository":{"id":41954097,"uuid":"403225573","full_name":"vnpy/vnpy_mysql","owner":"vnpy","description":"VeighNa框架的MySQL数据库接口","archived":false,"fork":false,"pushed_at":"2025-04-08T01:35:11.000Z","size":33,"stargazers_count":16,"open_issues_count":1,"forks_count":34,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T02:30:34.307Z","etag":null,"topics":["database","mysql","veighna","vnpy"],"latest_commit_sha":null,"homepage":"https://www.vnpy.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vnpy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-05T05:41:34.000Z","updated_at":"2025-03-29T20:55:00.000Z","dependencies_parsed_at":"2025-02-20T00:42:50.987Z","dependency_job_id":null,"html_url":"https://github.com/vnpy/vnpy_mysql","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnpy%2Fvnpy_mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnpy%2Fvnpy_mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnpy%2Fvnpy_mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnpy%2Fvnpy_mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vnpy","download_url":"https://codeload.github.com/vnpy/vnpy_mysql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248465348,"owners_count":21108244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","mysql","veighna","vnpy"],"created_at":"2024-10-13T21:03:46.240Z","updated_at":"2025-07-25T11:38:58.285Z","avatar_url":"https://github.com/vnpy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VeighNa框架的MySQL数据库接口\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src =\"https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src =\"https://img.shields.io/badge/version-1.1.1-blueviolet.svg\"/\u003e\n    \u003cimg src =\"https://img.shields.io/badge/platform-windows|linux|macos-yellow.svg\"/\u003e\n    \u003cimg src =\"https://img.shields.io/badge/python-3.10|3.11|3.12|3.13-blue.svg\" /\u003e\n\u003c/p\u003e\n\n## 说明\n\n基于peewee开发的MySQL数据库接口。\n\n## 使用\n\n### 全局配置\n\n在VeighNa中使用MySQL时，需要在全局配置中填写以下字段信息：\n\n|名称|含义|必填|举例|\n|---------|----|---|---|\n|database.name|名称|是|mysql|\n|database.host|地址|是|localhost|\n|database.port|端口|是|3306|\n|database.database|实例|是|vnpy|\n|database.user|用户名|是|root|\n|database.password|密码|是|123456|\n\n### 创建实例（Schema）\n\nVeighNa不会主动为MySQL数据库创建实例，所以使用前请确保database.database字段中填写的的数据库实例已经创建了。\n\n若实例尚未创建，可以使用【MySQL Workbench】客户端的【new_schema】进行操作。\n\n\n### 字符串大小写敏感支持\n\n由于peewee的建表功能限制，默认情况下在保存合约代码的【symbol】字段时，无法区分字符串大小写。如果影响使用，可按照以下方式手动修改MySQL数据表来解决：\n\n```\n# 用MySQL命令行工具连接数据库\n\n# 选择数据实例\nuse vnpy;\n\n# 修改四张表symbol字段的BINARY属性\nALTER TABLE `dbbaroverview` MODIFY COLUMN `symbol` VARCHAR(45) BINARY;\n\nALTER TABLE `dbtickoverview` MODIFY COLUMN `symbol` VARCHAR(45) BINARY;\n\nALTER TABLE `dbbardata` MODIFY COLUMN `symbol` VARCHAR(45) BINARY;\n\nALTER TABLE `dbtickdata` MODIFY COLUMN `symbol` VARCHAR(45) BINARY;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvnpy%2Fvnpy_mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvnpy%2Fvnpy_mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvnpy%2Fvnpy_mysql/lists"}