diff --git a/acrate-core/migrations/2024-11-14-031744_meta/up.sql b/acrate-core/migrations/2024-11-14-031744_meta/up.sql index 41771cb..222b04d 100644 --- a/acrate-core/migrations/2024-11-14-031744_meta/up.sql +++ b/acrate-core/migrations/2024-11-14-031744_meta/up.sql @@ -1,5 +1,6 @@ CREATE TABLE meta_aliases ( id UUID DEFAULT gen_random_uuid(), + document BPCHAR NOT NULL, pattern BPCHAR NOT NULL, alias BPCHAR NOT NULL, @@ -9,6 +10,7 @@ CREATE TABLE meta_aliases ( CREATE TABLE meta_links ( id UUID DEFAULT gen_random_uuid(), + document BPCHAR NOT NULL, pattern BPCHAR NOT NULL, rel BPCHAR NOT NULL, type BPCHAR, @@ -28,6 +30,7 @@ CREATE TABLE meta_link_properties ( CREATE TABLE meta_properties ( id UUID DEFAULT gen_random_uuid(), + document BPCHAR NOT NULL, pattern BPCHAR NOT NULL, value BPCHAR, diff --git a/acrate-core/src/schema.rs b/acrate-core/src/schema.rs index 51159fd..4be615f 100644 --- a/acrate-core/src/schema.rs +++ b/acrate-core/src/schema.rs @@ -3,6 +3,7 @@ diesel::table! { meta_aliases (id) { id -> Uuid, + document -> Bpchar, pattern -> Bpchar, alias -> Bpchar, } @@ -20,9 +21,11 @@ diesel::table! { diesel::table! { meta_links (id) { id -> Uuid, + document -> Bpchar, pattern -> Bpchar, rel -> Bpchar, - r#type -> Nullable, + #[sql_name = "type"] + type_ -> Nullable, href -> Nullable, } } @@ -30,6 +33,7 @@ diesel::table! { diesel::table! { meta_properties (id) { id -> Uuid, + document -> Bpchar, pattern -> Bpchar, value -> Nullable, }