mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
Support per-format provider key auth
This commit is contained in:
@@ -465,7 +465,7 @@ CREATE TABLE IF NOT EXISTS public.payment_orders (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.provider_api_keys (
|
||||
id character varying(36) NOT NULL,
|
||||
api_key text NOT NULL,
|
||||
api_key text,
|
||||
name character varying(100) NOT NULL,
|
||||
note character varying(500),
|
||||
internal_priority integer DEFAULT 50,
|
||||
@@ -496,6 +496,7 @@ CREATE TABLE IF NOT EXISTS public.provider_api_keys (
|
||||
updated_at timestamp with time zone DEFAULT now() NOT NULL,
|
||||
provider_id character varying(36) NOT NULL,
|
||||
api_formats json,
|
||||
auth_type_by_format json,
|
||||
rate_multipliers json,
|
||||
health_by_format jsonb,
|
||||
circuit_breaker_by_format jsonb,
|
||||
@@ -1992,21 +1993,6 @@ END $mig$;
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Name: provider_endpoints uq_provider_api_format; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
DO $mig$ BEGIN
|
||||
ALTER TABLE ONLY public.provider_endpoints
|
||||
ADD CONSTRAINT uq_provider_api_format UNIQUE (provider_id, api_format);
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN NULL;
|
||||
WHEN duplicate_table THEN NULL;
|
||||
WHEN invalid_table_definition THEN NULL;
|
||||
END $mig$;
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Name: models uq_provider_model; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@@ -2503,6 +2489,14 @@ CREATE INDEX IF NOT EXISTS idx_endpoint_format_active ON public.provider_endpoin
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx_provider_endpoints_provider_api_format; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_provider_endpoints_provider_api_format ON public.provider_endpoints USING btree (provider_id, api_format);
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx_gemini_file_mappings_expires; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user