narrow-hospital-35452
11/21/2024, 3:54 PMbrief-egg-61061
11/21/2024, 3:54 PMbrief-egg-61061
11/21/2024, 3:55 PMkratos 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.narrow-hospital-35452
11/21/2024, 6:47 PM: ERROR: permission denied to create extension "pg_trgm" (SQLSTATE 42501)
brief-egg-61061
11/21/2024, 6:47 PMbrief-egg-61061
11/21/2024, 6:48 PMpg_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: 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.