diff --git a/database/migrations/schema/025_fix_index.sql b/database/migrations/schema/025_fix_index.sql new file mode 100644 index 00000000..c8737397 --- /dev/null +++ b/database/migrations/schema/025_fix_index.sql @@ -0,0 +1,9 @@ +drop index snapshot_not_deprecated_with_readme_idx; +create index snapshot_not_deprecated_with_readme_idx on snapshot (package_id, version) include (ts) +where (deprecated is null or deprecated = false) and readme is not null; + +---- create above / drop below ---- + +drop index snapshot_not_deprecated_with_readme_idx; +create index snapshot_not_deprecated_with_readme_idx on snapshot (package_id, version) include (created_at) +where (deprecated is null or deprecated = false) and readme is not null;