This PR enhances error handling in the database package by introducing
custom error types that wrap dialect-specific errors, providing better
abstraction and context for error handling across the application.
* Introduces standardized custom error types for common database errors
(no rows found, integrity violations, etc.)
* Wraps all PostgreSQL-specific errors at the dialect layer to provide
consistent error handling
# Which Problems Are Solved
The database package didn't wrap the errors from dialect specifc
packages.
# How the Problems Are Solved
Custom errors were added which wrap the dialect specifc errors.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Which Problems Are Solved
1. there was no embedded database to run tests against
2. there were no tests for postgres/migrate
3. there was no test setup for repository which starts a client for the
embedded database
# How the Problems Are Solved
1. postgres/embedded package was added
2. tests were added
3. TestMain was added incl. an example test
# Additional Changes
none
# Additional Context
closes#9934
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Which Problems Are Solved
To start with transactional tables we need to setup the new `zitadel`
schema in a way that does not rely on the event store later.
# How the Problems Are Solved
Setup step added which calls the function which executes the migrations.
# Additional Changes
none
# Additional Context
- closes#9933