Merge branch 'main' of git.hackbever.be:rusty-bever/blog
commit
5b465867e6
|
@ -51,7 +51,6 @@ incremental = true
|
|||
|
||||
[profile.release]
|
||||
lto = "fat"
|
||||
incremental = true
|
||||
codegen-units = 1
|
||||
|
||||
# For releases also try to max optimizations for dependencies:
|
||||
|
@ -59,4 +58,3 @@ codegen-units = 1
|
|||
opt-level = 3
|
||||
[profile.release.package."*"]
|
||||
opt-level = 3
|
||||
|
||||
|
|
|
@ -5,5 +5,6 @@ drop function enforce_version_titles;
|
|||
drop index sections_shortname_index;
|
||||
|
||||
drop table versions cascade;
|
||||
drop table tags cascade;
|
||||
drop table posts cascade;
|
||||
drop table sections cascade;
|
||||
|
|
|
@ -48,7 +48,14 @@ create table versions (
|
|||
|
||||
-- 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.
|
||||
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 $$
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
unstable_features = true
|
||||
binop_separator = "Front"
|
||||
blank_lines_lower_bound = 0
|
||||
blank_lines_upper_bound = 1
|
||||
|
@ -49,7 +50,6 @@ reorder_imports = true
|
|||
reorder_modules = true
|
||||
report_fixme = "Always"
|
||||
report_todo = "Always"
|
||||
required_version = "1.4.37"
|
||||
skip_children = false
|
||||
space_after_colon = true
|
||||
space_before_colon = false
|
||||
|
@ -60,7 +60,6 @@ tab_spaces = 4
|
|||
trailing_comma = "Vertical"
|
||||
trailing_semicolon = true
|
||||
type_punctuation_density = "Wide"
|
||||
unstable_features = false
|
||||
use_field_init_shorthand = false
|
||||
use_small_heuristics = "Default"
|
||||
use_try_shorthand = false
|
||||
|
|
|
@ -19,6 +19,13 @@ table! {
|
|||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
tags (post_id, value) {
|
||||
post_id -> Uuid,
|
||||
value -> Varchar,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
versions (id) {
|
||||
id -> Uuid,
|
||||
|
@ -31,10 +38,12 @@ table! {
|
|||
}
|
||||
|
||||
joinable!(posts -> sections (section_id));
|
||||
joinable!(tags -> posts (post_id));
|
||||
joinable!(versions -> posts (post_id));
|
||||
|
||||
allow_tables_to_appear_in_same_query!(
|
||||
posts,
|
||||
sections,
|
||||
tags,
|
||||
versions,
|
||||
);
|
||||
|
|
Reference in New Issue