From 7530424d5d1b2c70d847e53f99c3d8e9b25d1d79 Mon Sep 17 00:00:00 2001 From: eltrac Date: Sat, 24 Oct 2026 18:53:45 +0800 Subject: storage/h2: fix startup failure when indexes are already created add "if not exists" condition before creating indexes --- project.clj | 2 +- resources/sql/h2_init.sql | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/project.clj b/project.clj index 0ec358b..5b46a17 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject weepinbell "v1.0.0-818b2d0" +(defproject weepinbell "v1.0.0-fcfdb21" :description "A Webmention receiver written in Clojure." :url "https://codeberg.org/eltrac/weepinbell" :license {:name "GNU Affero General Public License" diff --git a/resources/sql/h2_init.sql b/resources/sql/h2_init.sql index 475987f..4674842 100644 --- a/resources/sql/h2_init.sql +++ b/resources/sql/h2_init.sql @@ -31,10 +31,10 @@ create table if not exists proxied_photo ( on delete cascade ); -create index idx_webmention_hash on webmention (hash); +create index if not exists idx_webmention_hash on webmention (hash); -create index idx_webmention_pair on webmention (wm_source, wm_target); +create index if not exists idx_webmention_pair on webmention (wm_source, wm_target); -create index idx_webmention_domain on webmention (wm_target_domain); +create index if not exists idx_webmention_domain on webmention (wm_target_domain); -create index idx_webmention_uri on webmention (wm_target_domain, wm_target_path); +create index if not exists idx_webmention_uri on webmention (wm_target_domain, wm_target_path); -- cgit v1.2.3