From 92122bd96208ad9fc3ab32ee0a5986caaaafd739 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sun, 9 Jan 2022 11:56:27 +0100 Subject: [PATCH] sqlite: fix prefix for api_key indexes Signed-off-by: Nicola Murino --- dataprovider/sqlite.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dataprovider/sqlite.go b/dataprovider/sqlite.go index eeefa98b..ded8a640 100644 --- a/dataprovider/sqlite.go +++ b/dataprovider/sqlite.go @@ -59,8 +59,8 @@ INSERT INTO {{schema_version}} (version) VALUES (10); "updated_at" bigint NOT NULL, "last_use_at" bigint NOT NULL, "expires_at" bigint NOT NULL, "description" text NULL, "admin_id" integer NULL REFERENCES "{{admins}}" ("id") ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, "user_id" integer NULL REFERENCES "{{users}}" ("id") ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED); -CREATE INDEX "{{prefix}}api_keys_admin_id_idx" ON "api_keys" ("admin_id"); -CREATE INDEX "{{prefix}}api_keys_user_id_idx" ON "api_keys" ("user_id"); +CREATE INDEX "{{prefix}}api_keys_admin_id_idx" ON "{{api_keys}}" ("admin_id"); +CREATE INDEX "{{prefix}}api_keys_user_id_idx" ON "{{api_keys}}" ("user_id"); ` sqliteV11DownSQL = `DROP TABLE "{{api_keys}}";` sqliteV12SQL = `ALTER TABLE "{{admins}}" ADD COLUMN "created_at" bigint DEFAULT 0 NOT NULL;