Merge branch 'main' of git.hackbever.be:rusty-bever/blog

pull/5/head
Jef Roosens 2021-12-25 10:43:02 +01:00
commit 5b465867e6
Signed by: Jef Roosens
GPG Key ID: 955C0660072F691F
6 changed files with 22 additions and 5 deletions

View File

@ -51,7 +51,6 @@ incremental = true
[profile.release] [profile.release]
lto = "fat" lto = "fat"
incremental = true
codegen-units = 1 codegen-units = 1
# For releases also try to max optimizations for dependencies: # For releases also try to max optimizations for dependencies:
@ -59,4 +58,3 @@ codegen-units = 1
opt-level = 3 opt-level = 3
[profile.release.package."*"] [profile.release.package."*"]
opt-level = 3 opt-level = 3

View File

@ -5,5 +5,6 @@ drop function enforce_version_titles;
drop index sections_shortname_index; drop index sections_shortname_index;
drop table versions cascade; drop table versions cascade;
drop table tags cascade;
drop table posts cascade; drop table posts cascade;
drop table sections cascade; drop table sections cascade;

View File

@ -48,7 +48,14 @@ create table versions (
-- This check allows draft posts to be created without having to enter a -- This check allows draft posts to be created without having to enter a
-- publish date, but forces them to have one if they're not a draft. -- publish date, but forces them to have one if they're not a draft.
CHECK (is_draft OR publish_date IS NOT NULL) CONSTRAINT no_null_published_date CHECK (is_draft OR publish_date IS NOT NULL)
);
create table tags (
post_id uuid NOT NULL REFERENCES posts(id) ON DELETE CASCADE,
value varchar(64) NOT NULL,
PRIMARY KEY (post_id, value)
); );
create function enforce_version_titles() returns trigger as $$ create function enforce_version_titles() returns trigger as $$

3
renovate.json 100644
View File

@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}

View File

@ -1,3 +1,4 @@
unstable_features = true
binop_separator = "Front" binop_separator = "Front"
blank_lines_lower_bound = 0 blank_lines_lower_bound = 0
blank_lines_upper_bound = 1 blank_lines_upper_bound = 1
@ -49,7 +50,6 @@ reorder_imports = true
reorder_modules = true reorder_modules = true
report_fixme = "Always" report_fixme = "Always"
report_todo = "Always" report_todo = "Always"
required_version = "1.4.37"
skip_children = false skip_children = false
space_after_colon = true space_after_colon = true
space_before_colon = false space_before_colon = false
@ -60,7 +60,6 @@ tab_spaces = 4
trailing_comma = "Vertical" trailing_comma = "Vertical"
trailing_semicolon = true trailing_semicolon = true
type_punctuation_density = "Wide" type_punctuation_density = "Wide"
unstable_features = false
use_field_init_shorthand = false use_field_init_shorthand = false
use_small_heuristics = "Default" use_small_heuristics = "Default"
use_try_shorthand = false use_try_shorthand = false

View File

@ -19,6 +19,13 @@ table! {
} }
} }
table! {
tags (post_id, value) {
post_id -> Uuid,
value -> Varchar,
}
}
table! { table! {
versions (id) { versions (id) {
id -> Uuid, id -> Uuid,
@ -31,10 +38,12 @@ table! {
} }
joinable!(posts -> sections (section_id)); joinable!(posts -> sections (section_id));
joinable!(tags -> posts (post_id));
joinable!(versions -> posts (post_id)); joinable!(versions -> posts (post_id));
allow_tables_to_appear_in_same_query!( allow_tables_to_appear_in_same_query!(
posts, posts,
sections, sections,
tags,
versions, versions,
); );