1
Fork 0

Create webfinger crate #5

Merged
steffo merged 53 commits from feature/webfinger into main 2024-11-16 06:33:06 +00:00
3 changed files with 9 additions and 8 deletions
Showing only changes of commit f2d73c1798 - Show all commits

View file

@ -1,4 +1,5 @@
DROP TABLE IF EXISTS meta_properties CASCADE; DROP TABLE IF EXISTS meta_properties CASCADE;
DROP TABLE IF EXISTS meta_link_properties CASCADE; DROP TABLE IF EXISTS meta_link_properties CASCADE;
DROP TABLE IF EXISTS meta_link_titles CASCADE;
DROP TABLE IF EXISTS meta_links CASCADE; DROP TABLE IF EXISTS meta_links CASCADE;
DROP TABLE IF EXISTS meta_aliases CASCADE; DROP TABLE IF EXISTS meta_aliases CASCADE;

View file

@ -1,4 +1,4 @@
CREATE TABLE meta_aliases ( CREATE TABLE IF NOT EXISTS meta_aliases (
id UUID DEFAULT gen_random_uuid(), id UUID DEFAULT gen_random_uuid(),
document BPCHAR NOT NULL, document BPCHAR NOT NULL,
pattern BPCHAR NOT NULL, pattern BPCHAR NOT NULL,
@ -7,7 +7,7 @@ CREATE TABLE meta_aliases (
PRIMARY KEY (id) PRIMARY KEY (id)
); );
CREATE TABLE meta_links ( CREATE TABLE IF NOT EXISTS meta_links (
id UUID DEFAULT gen_random_uuid(), id UUID DEFAULT gen_random_uuid(),
document BPCHAR NOT NULL, document BPCHAR NOT NULL,
pattern BPCHAR NOT NULL, pattern BPCHAR NOT NULL,
@ -24,7 +24,7 @@ CREATE TABLE meta_links (
PRIMARY KEY (id) PRIMARY KEY (id)
); );
CREATE TABLE meta_link_properties ( CREATE TABLE IF NOT EXISTS meta_link_properties (
id UUID DEFAULT gen_random_uuid(), id UUID DEFAULT gen_random_uuid(),
meta_link_id UUID REFERENCES meta_links (id) NOT NULL, meta_link_id UUID REFERENCES meta_links (id) NOT NULL,
rel BPCHAR NOT NULL, rel BPCHAR NOT NULL,
@ -33,7 +33,7 @@ CREATE TABLE meta_link_properties (
PRIMARY KEY (id) PRIMARY KEY (id)
); );
CREATE TABLE meta_properties ( CREATE TABLE IF NOT EXISTS meta_properties (
id UUID DEFAULT gen_random_uuid(), id UUID DEFAULT gen_random_uuid(),
document BPCHAR NOT NULL, document BPCHAR NOT NULL,
pattern BPCHAR NOT NULL, pattern BPCHAR NOT NULL,
@ -43,12 +43,12 @@ CREATE TABLE meta_properties (
PRIMARY KEY (id) PRIMARY KEY (id)
); );
CREATE TABLE meta_link_titles ( CREATE TABLE IF NOT EXISTS meta_link_titles (
id UUID DEFAULT gen_random_uuid(), id UUID DEFAULT gen_random_uuid(),
meta_link_id UUID REFERENCES meta_links (id) NOT NULL, meta_link_id UUID REFERENCES meta_links (id) NOT NULL,
lang BPCHAR NOT NULL DEFAULT 'und', language BPCHAR NOT NULL DEFAULT 'und',
value BPCHAR NOT NULL, value BPCHAR NOT NULL,
CONSTRAINT unique_languages UNIQUE (meta_link_id, lang), CONSTRAINT unique_languages UNIQUE (meta_link_id, language),
PRIMARY KEY(id) PRIMARY KEY(id)
); );

View file

@ -22,7 +22,7 @@ diesel::table! {
meta_link_titles (id) { meta_link_titles (id) {
id -> Uuid, id -> Uuid,
meta_link_id -> Uuid, meta_link_id -> Uuid,
lang -> Bpchar, language -> Bpchar,
value -> Bpchar, value -> Bpchar,
} }
} }