{"id":21556978,"url":"https://github.com/colopl/laravel-tidb","last_synced_at":"2025-04-10T10:22:58.617Z","repository":{"id":44875810,"uuid":"434511991","full_name":"colopl/laravel-tidb","owner":"colopl","description":"Laravel database driver for PingCAP TiDB","archived":false,"fork":false,"pushed_at":"2024-03-19T01:31:07.000Z","size":52,"stargazers_count":21,"open_issues_count":2,"forks_count":5,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-24T09:11:31.176Z","etag":null,"topics":["laravel","php","tidb"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colopl.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-12-03T07:56:48.000Z","updated_at":"2024-12-31T18:25:01.000Z","dependencies_parsed_at":"2024-11-24T10:03:07.708Z","dependency_job_id":null,"html_url":"https://github.com/colopl/laravel-tidb","commit_stats":{"total_commits":36,"total_committers":3,"mean_commits":12.0,"dds":0.08333333333333337,"last_synced_commit":"6d668732a373e2dac394d10e001d4c41c586e07d"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colopl%2Flaravel-tidb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colopl%2Flaravel-tidb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colopl%2Flaravel-tidb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colopl%2Flaravel-tidb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colopl","download_url":"https://codeload.github.com/colopl/laravel-tidb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199079,"owners_count":21063641,"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":["laravel","php","tidb"],"created_at":"2024-11-24T08:10:34.589Z","updated_at":"2025-04-10T10:22:58.574Z","avatar_url":"https://github.com/colopl.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"laravel-tidb\n================\n\nLaravel database driver for [TiDB](https://github.com/pingcap/tidb)\n\n## Requirements\n\n- PHP \u003e= 7.4\n- Laravel 6 ~ 10\n- TiDB \u003e= 4.0\n\n## Installation\n\nInstall via composer\n\n```sh\ncomposer require colopl/laravel-tidb\n```\n\nThat's all. You can use database connection as usual.\n\n\n## Features\n\n- Added `autoRandom($shard_bits = null)` to `ColumnDefinition`\n- When user defines `$table-\u003eid()` in the migration file, it will add `PRIMARY KEY AUTO_RANDOM` to the schema instead of `PRIMARY KEY AUTO_INCREMENT` so that data gets distributed evenly.\n- Added Support for nested transactions (MySQL driver will throw an exception)\n- Added Support for adding/dropping multiple columns (MySQL driver will throw an exception)\n\n## Unsupported features\n\n1. Nesting transactions and then rolling them back will always rollback to the first transaction since `SAVEPOINT` is not supported by TiDB. In other words, rolling back with `$connection-\u003erollBack()` will always rollback level to `0`.\n2. Adding and dropping multiple columns atomically is not fully supported. Defining multiple columns in migrations is supported but will be executed one by one and will not be atomic. Ex: `$table-\u003edropColumn('title', 'content')`\n\n\nFor unsupported features for TiDB itself, please see [MySQL Compatibility](https://docs.pingcap.com/tidb/stable/mysql-compatibility).\n\n\n### Testing\nYou can run tests on docker by the following command.\n\n```sh\nmake test\n```\n\n\n## License\nApache 2.0 - See [LICENSE](./LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolopl%2Flaravel-tidb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolopl%2Flaravel-tidb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolopl%2Flaravel-tidb/lists"}