diff --git a/db/structure.sql b/db/structure.sql index e0d8f710..cb085f63 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -9,13 +9,6 @@ SET xmloption = content; SET client_min_messages = warning; SET row_security = off; --- --- Name: public; Type: SCHEMA; Schema: -; Owner: - --- - --- *not* creating schema, since initdb creates it - - -- -- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: - -- @@ -44,6 +37,35 @@ CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public; COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions'; +-- +-- Name: access_logs_before_insert_row_tr(); Type: FUNCTION; Schema: public; Owner: - +-- + +CREATE FUNCTION public.access_logs_before_insert_row_tr() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + new.created_at := to_timestamp(new.msec); + RETURN NEW; +END; +$$; + + +-- +-- Name: indexed_posts_before_insert_update_row_tr(); Type: FUNCTION; Schema: public; Owner: - +-- + +CREATE FUNCTION public.indexed_posts_before_insert_update_row_tr() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + new.indexed_content := to_tsvector(('pg_catalog.' || new.dictionary)::regconfig, coalesce(new.title, '') || ' + ' || coalesce(new.content,'')); + RETURN NEW; +END; +$$; + + -- -- Name: que_validate_tags(jsonb); Type: FUNCTION; Schema: public; Owner: - -- @@ -103,35 +125,6 @@ WITH (fillfactor='90'); COMMENT ON TABLE public.que_jobs IS '7'; --- --- Name: access_logs_before_insert_row_tr(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION public.access_logs_before_insert_row_tr() RETURNS trigger - LANGUAGE plpgsql - AS $$ -BEGIN - new.created_at := to_timestamp(new.msec); - RETURN NEW; -END; -$$; - - --- --- Name: indexed_posts_before_insert_update_row_tr(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION public.indexed_posts_before_insert_update_row_tr() RETURNS trigger - LANGUAGE plpgsql - AS $$ -BEGIN - new.indexed_content := to_tsvector(('pg_catalog.' || new.dictionary)::regconfig, coalesce(new.title, '') || ' - ' || coalesce(new.content,'')); - RETURN NEW; -END; -$$; - - -- -- Name: que_determine_job_state(public.que_jobs); Type: FUNCTION; Schema: public; Owner: - -- @@ -1149,7 +1142,8 @@ CREATE TABLE public.roles ( site_id integer, usuarie_id integer, rol character varying, - temporal boolean + temporal boolean, + token character varying ); @@ -1236,7 +1230,9 @@ CREATE TABLE public.sites ( tienda_url character varying DEFAULT ''::character varying, api_key_ciphertext character varying, slugify_mode character varying DEFAULT 'default'::character varying, - pagination boolean DEFAULT false + pagination boolean DEFAULT false, + private_key_pem_ciphertext text, + last_indexed_commit character varying ); @@ -2318,6 +2314,10 @@ INSERT INTO "schema_migrations" (version) VALUES ('20230421182627'), ('20230424174544'), ('20230519143500'), -('20230524190240'); +('20230524190240'), +('20230731195050'), +('20230829204127'), +('20230921155401'), +('20230927153926');