CJVT updates August and September 2026
This commit is contained in:
@@ -48,7 +48,7 @@ CREATE TABLE dictionary (
|
||||
time_published TIMESTAMPTZ,
|
||||
status dictionary_status NOT NULL DEFAULT 'closed',
|
||||
count_entries INT NOT NULL DEFAULT 0, -- This one is updated manually and not through triggers.
|
||||
count_comments INT,
|
||||
count_comments INT, -- Indicator of own dictionaries: NULL means synced in from a linked/federated portal.
|
||||
description VARCHAR,
|
||||
entries_have_domain_labels BOOL NOT NULL DEFAULT FALSE,
|
||||
entries_have_label BOOL NOT NULL DEFAULT FALSE,
|
||||
|
||||
@@ -66,5 +66,4 @@ VALUES
|
||||
('Zgodovina', 'History', '93/94', 'Zgodovina in umetnost', 'H 003', 'Humanities', '3611'),
|
||||
('Zoologija', 'Zoology', '59', 'Zoologija', 'B 005', 'Natural and applied sciences', '3606'),
|
||||
('Zootehnika in veterina', 'Zootechnics and veterinary medicine', '636', 'Zootehnika, živinoreja, vzreja', 'B 400', 'Health', '2841'),
|
||||
('Živilstvo in kulinarika', 'Food industry and culinary', '641', 'Tehnologija hrane in pijač', 'T 430', 'Foodstuff', '6026'),
|
||||
('Neopredeljeno', 'Undefined', '', '', '', '', '');
|
||||
('Živilstvo in kulinarika', 'Food industry and culinary', '641', 'Tehnologija hrane in pijač', 'T 430', 'Foodstuff', '6026');
|
||||
|
||||
@@ -87,7 +87,7 @@ CREATE TABLE process (
|
||||
report VARCHAR
|
||||
);
|
||||
|
||||
CREATE TYPE import_file_format AS ENUM ('xml', 'csv', 'tsv');
|
||||
CREATE TYPE import_file_format AS ENUM ('xml', 'csv', 'tsv', 'json_term_candidates');
|
||||
|
||||
CREATE TYPE import_file_status AS ENUM ('in progress', 'error', 'done');
|
||||
|
||||
|
||||
@@ -31,21 +31,6 @@ DECLARE
|
||||
_secondary_domain_id domain_secondary.id%type;
|
||||
|
||||
BEGIN
|
||||
-- Check uniqueness of names within own dictionaries.
|
||||
IF EXISTS (
|
||||
SELECT 1
|
||||
FROM dictionary
|
||||
WHERE
|
||||
count_comments IS NOT NULL AND -- Indicator of own dictionaries.
|
||||
(
|
||||
name_sl = _name_sl OR
|
||||
name_sl_short = _name_sl_short OR
|
||||
name_en = _name_en
|
||||
)
|
||||
) THEN
|
||||
RAISE EXCEPTION 'One of dictionary names not unique among own dictionaries.';
|
||||
END IF;
|
||||
|
||||
-- Create new dictionary.
|
||||
INSERT INTO dictionary (
|
||||
name_sl,
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
-- Client-supplied IANA time zone (e.g. 'Europe/Ljubljana'), captured when the
|
||||
-- export is started, used to render dates embedded in the exported file
|
||||
-- content and the download filename in the requesting browser's local time
|
||||
-- instead of the server's.
|
||||
ALTER TABLE dictionary_export ADD COLUMN time_zone TEXT;
|
||||
@@ -0,0 +1,18 @@
|
||||
-- Adds support for federated/SSO login (OIDC) alongside local username+password accounts. Only
|
||||
-- one external identity provider is modeled today: the University of Ljubljana (backed by
|
||||
-- Microsoft Entra ID in production; a throwaway local Authentik instance stands in for it in dev
|
||||
-- - see dev/authentik/). The auth_provider enum intentionally has just these two values.
|
||||
|
||||
CREATE TYPE auth_provider AS ENUM ('local', 'uni_lj');
|
||||
|
||||
-- SSO-only users are authenticated entirely by the external IdP and never set a local password.
|
||||
ALTER TABLE "user" ALTER COLUMN bcrypt_hash DROP NOT NULL;
|
||||
|
||||
CREATE TABLE user_external_identity (
|
||||
auth_provider auth_provider NOT NULL,
|
||||
subject VARCHAR NOT NULL,
|
||||
user_id INT NOT NULL REFERENCES "user",
|
||||
time_linked TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
PRIMARY KEY (auth_provider, subject),
|
||||
UNIQUE (user_id, auth_provider)
|
||||
);
|
||||
Reference in New Issue
Block a user