Index

public.certificate_configurations

Description

Configures how a certificate should be rendered. Can be used to change certificate background, certificate overlay, font sizes, font positions, etc.

Columns

Name Type Default Nullable Children Parents Comment
background_svg_file_upload_id uuid false public.file_uploads The file upload record for the background svg.
background_svg_path varchar(255) false The path to the background svg file in the file store.
certificate_date_font_size varchar(255) ‘30px’::character varying false The font size of the certificate date.
certificate_date_text_anchor certificate_text_anchor ‘start’::certificate_text_anchor false How the date should be aligned relative to the given x and y positions. See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor.
certificate_date_text_color varchar(255) ‘black’::character varying false The color of the certificate date.
certificate_date_x_pos varchar(255) ‘15%’::character varying false The x position of the certificate date.
certificate_date_y_pos varchar(255) ‘88.5%’::character varying false The y position of the certificate date.
certificate_locale varchar(255) ‘en’::character varying false The locale of the certificate e.g. en, fi, sv, etc. Impacts the format of the date.
certificate_owner_name_font_size varchar(255) ‘150px’::character varying false The font size of the certificate owner name.
certificate_owner_name_text_anchor certificate_text_anchor ‘middle’::certificate_text_anchor false How the owner name should be aligned relative to the given x and y positions. See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor.
certificate_owner_name_text_color varchar(255) ‘black’::character varying false The color of the certificate owner name.
certificate_owner_name_x_pos varchar(255) ‘50%’::character varying false The x position of the certificate owner name.
certificate_owner_name_y_pos varchar(255) ‘70%’::character varying false The y position of the certificate owner name.
certificate_validate_url_font_size varchar(255) ‘30px’::character varying false The font size of the certificate validate url.
certificate_validate_url_text_anchor certificate_text_anchor ‘end’::certificate_text_anchor false How the validate url should be aligned relative to the given x and y positions. See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor.
certificate_validate_url_text_color varchar(255) ‘black’::character varying false The color of the certificate validate url.
certificate_validate_url_x_pos varchar(255) ‘88.5%’::character varying false The x position of the certificate validate url.
certificate_validate_url_y_pos varchar(255) ‘80%’::character varying false The y position of the certificate validate url.
created_at timestamp with time zone now() false Timestamp when the record was created.
deleted_at timestamp with time zone true Timestamp when the record was deleted. If null, the record is not deleted.
id uuid uuid_generate_v4() false public.certificate_configuration_to_requirements public.generated_certificates A unique, stable identifier for the record.
overlay_svg_file_upload_id uuid true public.file_uploads Optional. The file upload record for the overlay svg.
overlay_svg_path varchar(255) true Optional. The path to the overlay svg file in the file store. The overlay svg is rendered on top of the certificate after everything else has been rendered.
paper_size certificate_paper_size ‘horizontal-a4’::certificate_paper_size false The paper size of the certificate. Available options are horizontal-a4 and vertical-a4.
updated_at timestamp with time zone now() false Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger.

Constraints

Name Type Definition
course_module_certificate_con_background_svg_file_upload_i_fkey FOREIGN KEY FOREIGN KEY (background_svg_file_upload_id) REFERENCES file_uploads(id)
course_module_certificate_confi_overlay_svg_file_upload_id_fkey FOREIGN KEY FOREIGN KEY (overlay_svg_file_upload_id) REFERENCES file_uploads(id)
course_module_certificate_configurations_pkey PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
course_module_certificate_configurations_pkey CREATE UNIQUE INDEX course_module_certificate_configurations_pkey ON public.certificate_configurations USING btree (id)

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.certificate_configurations FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls