<@U04UQ68083H> if I want to upgrade ory kratos fro...
# ory-copilot
n
@chilly-king-10285 if I want to upgrade ory kratos from v0.11.1 to 1.1.0 do I need to step by step on each version or can directly go to 1.1.0?
b
A message from kapa.ai
To upgrade Ory Kratos from v0.11.1 to v1.1.0, it's generally recommended to perform a stepped upgrade rather than jumping directly to the latest version. This approach helps ensure a smoother transition and reduces the risk of unexpected issues. Here's why: 1. Breaking changes: Ory Kratos may introduce breaking changes between major versions. By upgrading step-by-step, you can address these changes incrementally, making the process more manageable [Ory Ecosystem Versioning and upgrades](https://www.ory.sh/docs/ecosystem/upgrading). 2. Database migrations: Each version may include database schema changes. Running
kratos migrate sql
for each intermediate version ensures that your database schema is updated correctly [Kratos CLI migrate sql](https://www.ory.sh/docs/kratos/cli/kratos-migrate-sql). 3. Compatibility: Stepped upgrades allow you to test compatibility with your existing setup at each stage, making it easier to identify and resolve any issues that may arise. To perform the upgrade, you should: 1. Review the changelogs for each version between v0.11.1 and v1.1.0 [Ory Kratos Changelog](https://github.com/ory/kratos/blob/master/CHANGELOG.md). 2. Backup your data before starting the upgrade process [Kratos Upgrade Guide](https://www.ory.sh/docs/kratos/guides/upgrade). 3. Upgrade to each intermediate version (e.g., v0.11.2, v0.11.3, ..., v1.0.0, v1.1.0), running the necessary migrations and testing at each step. While it might be possible to upgrade directly to v1.1.0, doing so increases the risk of encountering issues due to accumulated changes across multiple versions. The stepped approach is safer and more aligned with best practices for upgrading critical infrastructure like Ory Kratos.
n
@chilly-king-10285 when doing migration got error
: ERROR: permission denied to create extension "pg_trgm" (SQLSTATE 42501)
b
A message from kapa.ai
This error suggests that you're encountering a permission issue while trying to run the Ory Kratos database migrations. Specifically, the error indicates that the database user doesn't have the necessary permissions to create the
pg_trgm
extension in PostgreSQL. To resolve this issue, you need to ensure that the database user has the appropriate permissions. Here are the steps you can take: 1. First, make sure you're using a database user with sufficient privileges. Ideally, this should be a superuser or a user with the ability to create extensions. 2. If you can't use a superuser account, you'll need to have a PostgreSQL superuser (like the 'postgres' user) create the extension for you before running the Kratos migrations. You can do this by executing the following SQL command as a superuser:
Copy code
sql    CREATE EXTENSION IF NOT EXISTS pg_trgm;
3. After creating the extension, try running the Kratos migrations again using the
kratos migrate sql
command [Kratos CLI migrate sql](https://www.ory.sh/docs/kratos/cli/kratos-migrate-sql). If you're still encountering issues, you might need to review your PostgreSQL user permissions and database configuration. Ensure that the user specified in your Kratos configuration has the necessary privileges to perform all required operations during migration. Remember to always backup your database before performing migrations [Kratos Upgrade Guide](https://www.ory.sh/docs/kratos/guides/upgrade). If the problem persists, you may need to consult with your database administrator or review the PostgreSQL documentation for more detailed information on managing user permissions and extensions.