diff --git a/backend/migrations/2020-11-04-153112_blogposts/down.sql b/backend/migrations/2020-11-04-153112_blogposts/down.sql new file mode 100644 index 0000000..4f81189 --- /dev/null +++ b/backend/migrations/2020-11-04-153112_blogposts/down.sql @@ -0,0 +1 @@ +DROP TABLE blogposts; diff --git a/backend/migrations/2020-11-04-153112_blogposts/up.sql b/backend/migrations/2020-11-04-153112_blogposts/up.sql new file mode 100644 index 0000000..add9329 --- /dev/null +++ b/backend/migrations/2020-11-04-153112_blogposts/up.sql @@ -0,0 +1,4 @@ +CREATE TABLE IF NOT EXISTS blogposts + ( url UNIQUE NOT NULL PRIMARY KEY + , title TEXT NOT NULL + ) diff --git a/backend/src/schema.rs b/backend/src/schema.rs index 5314ec6..fcaf230 100644 --- a/backend/src/schema.rs +++ b/backend/src/schema.rs @@ -1,3 +1,10 @@ +table! { + blogposts (url) { + url -> Binary, + title -> Text, + } +} + table! { members (id) { id -> Integer, @@ -26,6 +33,7 @@ table! { joinable!(switches -> members (member_id)); allow_tables_to_appear_in_same_query!( + blogposts, members, switches, webmentions,