{"id":17465515,"url":"https://github.com/prooph/pdo-event-store","last_synced_at":"2025-05-15T07:05:33.707Z","repository":{"id":12764285,"uuid":"72745467","full_name":"prooph/pdo-event-store","owner":"prooph","description":"PDO implementation of ProophEventStore http://getprooph.org","archived":false,"fork":false,"pushed_at":"2025-04-21T19:31:56.000Z","size":1826,"stargazers_count":110,"open_issues_count":6,"forks_count":58,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-21T20:38:52.765Z","etag":null,"topics":["cqrs","ddd","event-sourcing","event-store","mysql","php","postgres"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prooph.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,"zenodo":null}},"created_at":"2016-11-03T12:58:43.000Z","updated_at":"2025-04-21T19:32:00.000Z","dependencies_parsed_at":"2025-04-11T14:48:42.817Z","dependency_job_id":null,"html_url":"https://github.com/prooph/pdo-event-store","commit_stats":{"total_commits":656,"total_committers":44,"mean_commits":"14.909090909090908","dds":0.4542682926829268,"last_synced_commit":"118e727d9efd90ecf04d712841d67231d84c8f34"},"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prooph%2Fpdo-event-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prooph%2Fpdo-event-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prooph%2Fpdo-event-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prooph%2Fpdo-event-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prooph","download_url":"https://codeload.github.com/prooph/pdo-event-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292040,"owners_count":22046426,"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":["cqrs","ddd","event-sourcing","event-store","mysql","php","postgres"],"created_at":"2024-10-18T12:05:50.282Z","updated_at":"2025-05-15T07:05:28.696Z","avatar_url":"https://github.com/prooph.png","language":"PHP","readme":"# pdo-event-store\n\n[![Build Status](https://travis-ci.com/prooph/pdo-event-store.svg?branch=master)](https://travis-ci.com/prooph/pdo-event-store)\n[![Coverage Status](https://coveralls.io/repos/prooph/pdo-event-store/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/prooph/pdo-event-store?branch=master)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/prooph/improoph)\n\nPDO EventStore implementation for [Prooph EventStore](https://github.com/prooph/event-store)\n\nRequirements\n------------\n\n- PHP \u003e= 7.3\n- PDO_MySQL Extension or PDO_PGSQL Extension\n\nFor MariaDB you need server version \u003e= 10.2.11.  \n**Performance Impact**: see [MariaDB Indexes and Efficiency](docs/variants.md#MariaDB Indexes and Efficiency)\n\nFor MySQL you need server version \u003e= 5.7.9.\n\nFor Postgres you need server version \u003e= 9.4.\n\nAttention: Since v1.6.0 MariaDB Server has to be at least 10.2.11 due to a bugfix in MariaDB, see https://jira.mariadb.org/browse/MDEV-14402.\n\nSetup\n-----\n\nFor MariaDB run the script in `scripts/mariadb/01_event_streams_table.sql` on your server.\n\nFor MySQL run the script in `scripts/mysql/01_event_streams_table.sql` on your server.\n\nFor Postgres run the script in `scripts/postgres/01_event_streams_table.sql` on your server.\n\nThis will setup the required event streams table.\n\nIf you want to use the projections, run additionally the scripts `scripts/mariadb/02_projections_table.sql`\n(for MariaDB), `scripts/mysql/02_projections_table.sql` (for MySQL) or\n`scripts/postgres/02_projections_table.sql` (for Postgres) on your server.\n\nUpgrade from 1.6 to 1.7\n-----------------------\n\nStarting from v1.7 the pdo-event-store uses optimized table schemas.\nThe upgrade can be done in background with a script optimizing that process.\nA downtime for the database should not be needed.\nIn order to upgrade your existing database, you have to execute:\n\n- MariaDB\n\n```\nALTER TABLE `event_streams` MODIFY `metadata` LONGTEXT NOT NULL;\nALTER TABLE `projections` MODIFY `position` LONGTEXT;\nALTER TABLE `projections` MODIFY `state` LONGTEXT;\n```\n\nThen for all event-streams (`SELECT stream_name FROM event_streams`)\n\n```\nALTER TABLE \u003cstream_name\u003e MODIFY `payload` LONGTEXT NOT NULL;\nALTER TABLE \u003cstream_name\u003e MODIFY `metadata` LONGTEXT NOT NULL,\n```\n\n- MySQL\n\nnothing to upgrade\n\n- Postgres\n\nFor all event-streams (`SELECT stream_name FROM event_streams`)\n\n```\nALTER TABLE \u003cstream_name\u003e MODIFY event_id UUID NOT NULL;\n```\n\nAdditional note:\n\nWhen using Postgres, the event_id has to be a valid uuid, so be careful when using a custom MetadataMatcher, as the\nevent-store could throw an exception when passing a non-valid uuid (f.e. \"foo\") as uuid.\n\nThe migration is strongly recommended, but not required. It's fully backward-compatible. The change on Postgres is\nonly a microoptimization, the change on MariaDB prevents errors, when the stored json gets too big.\n\nIntroduction\n------------\n\n[![Prooph Event Store v7](https://img.youtube.com/vi/QhpDIqYQzg0/0.jpg)](https://www.youtube.com/watch?v=QhpDIqYQzg0)\n\nTests\n-----\nIf you want to run the unit tests locally you need a runnging MySql server listening on port `3306` \nand a running Postgres server listening on port `5432`. Both should contain an empty database `event_store_tests`.\n\n## Run Tests With Composer\n\n### MariaDb\n\n`$ vendor/bin/phpunit -c phpunit.xml.mariadb`\n\n### MySql\n\n`$ vendor/bin/phpunit -c phpunit.xml.mysql`\n\n### Postgres\n\n`$ vendor/bin/phpunit -c phpunit.xml.postgres`\n\n## Run Tests With Docker Compose\n\n### MariaDb\n\n```bash\ndocker-compose -f docker-compose-tests.yml run composer run-script test-mariadb --timeout 0; \\\ndocker-compose -f docker-compose-tests.yml stop\n```\n\n### MySql\n\n```bash\ndocker-compose -f docker-compose-tests.yml run composer run-script test-mysql --timeout 0; \\\ndocker-compose -f docker-compose-tests.yml stop\n```\n\n### Postgres\n\n```bash\ndocker-compose -f docker-compose-tests.yml run composer run-script test-postgres --timeout 0; \\\ndocker-compose -f docker-compose-tests.yml stop\n```\n\n## Support\n\n- Ask questions on Stack Overflow tagged with [#prooph](https://stackoverflow.com/questions/tagged/prooph).\n- File issues at [https://github.com/prooph/event-store/issues](https://github.com/prooph/event-store/issues).\n- Say hello in the [prooph gitter](https://gitter.im/prooph/improoph) chat.\n\n## Contribute\n\nPlease feel free to fork and extend existing or add new plugins and send a pull request with your changes!\nTo establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation.\n\n## License\n\nReleased under the [New BSD License](LICENSE).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprooph%2Fpdo-event-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprooph%2Fpdo-event-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprooph%2Fpdo-event-store/lists"}