#! /usr/bin/env sh # rocie - An enterprise grocery management system # # Copyright (C) 2026 Benedikt Peetz # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Rocie. # # You should have received a copy of the License along with this program. # If not, see . set -e root="$(dirname "$0")/.." db="${DATABASE_URL#sqlite://}" schema_file="$root/target/schema.dot" schema_svg="$root/target/schema.svg" mkdb.sh sqlite3 "$db" -init "$root/scripts/sqlite-schema-diagram.sql" "" >"$schema_file" dot -Tsvg "$schema_file" >"$schema_svg" imv "$schema_svg" # vim: ft=sh