Added index

pull/5/head
Jef Roosens 2021-12-25 10:42:36 +01:00
parent fb38a1c1bf
commit 8b784aec93
Signed by: Jef Roosens
GPG Key ID: 955C0660072F691F
4 changed files with 12 additions and 1 deletions

View File

@ -14,7 +14,7 @@ path = "src/main.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rb = { git = "https://git.hackbever.be/rusty-bever/common-rs.git" }
rb = { git = "https://git.rustybever.be/rusty-bever/common-rs.git" }
# Backend web framework
rocket = { version = "0.5.0-rc.1", features = [ "json", "uuid" ] }
# Used to provide Rocket routes with database connections

View File

@ -6,7 +6,15 @@ services:
image: 'postgres:14-alpine'
restart: 'always'
healthcheck:
test: pg_isready
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
environment:
- 'POSTGRES_DB=rb'
- 'POSTGRES_USER=rb'
- 'POSTGRES_PASSWORD=rb'
ports:

View File

@ -2,6 +2,7 @@
drop trigger insert_enforce_version_titles on versions;
drop trigger update_enforce_version_titles on versions;
drop function enforce_version_titles;
drop index sections_shortname_index;
drop table versions cascade;
drop table posts cascade;

View File

@ -15,6 +15,8 @@ create table sections (
is_private boolean NOT NULL DEFAULT false
);
create index sections_shortname_index on sections(shortname);
create table posts (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,