Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-enable pg_trm extension for postgres during DB creation. #5467

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

weitzman
Copy link
Member

No description provided.

@weitzman weitzman merged commit f6d507e into drush-ops:12.x Mar 15, 2023
@weitzman weitzman deleted the pg_trm branch March 15, 2023 01:02
@phil-s
Copy link

phil-s commented Nov 1, 2023

This should also happen in dropOrCreate().

This is to cover the scenario where the database is provisioned by some external process which doesn't know about Drupal-specific requirements and therefore doesn't create the pg_trgm extension. In that situation, drush site:install calls dropOrCreate() which drops all the tables but does not create the extension, and consequently the process errors out a bit later.

As CREATE EXTENSION IF NOT EXISTS pg_trgm is a no-op for the cases where the extension did already exist, I don't see a reason not to do this.

@phil-s
Copy link

phil-s commented Nov 1, 2023

And although it looks to me as if nothing would normally call SqlPgsql::createdbSql(), I think the command should be included there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants