484979ad53
Rust/Axum REST API (herbapi-api) with PostgreSQL, S3/Garage, OIDC auth. Dioxus 0.7 WASM frontend (herbapi-ui) with sidebar layout and botanical reference style. 9 SQL migrations covering families, species, cultivars, suppliers, companions, images, users, API tokens.
17 lines
531 B
SQL
17 lines
531 B
SQL
CREATE TABLE families (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
slug TEXT NOT NULL UNIQUE,
|
|
name_scientific TEXT NOT NULL,
|
|
name_en TEXT,
|
|
name_de TEXT,
|
|
description TEXT,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX idx_families_search ON families
|
|
USING GIN (to_tsvector('english',
|
|
coalesce(name_scientific,'') || ' ' ||
|
|
coalesce(name_en,'') || ' ' ||
|
|
coalesce(name_de,'')));
|