From ac9777782a7f8570a5e758ca0cc06e73b51e47ed Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 3 Sep 2023 22:02:33 -0500 Subject: [PATCH] Add script for updating diesel schema --- scripts/update-schema.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 scripts/update-schema.sh diff --git a/scripts/update-schema.sh b/scripts/update-schema.sh new file mode 100755 index 0000000..f22c84a --- /dev/null +++ b/scripts/update-schema.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +diesel \ + --database-url 'postgres://pictrs:1234@localhost:5432/pictrs' \ + print-schema \ + --custom-type-derives "diesel::query_builder::QueryId" \ + > src/repo/postgres/schema.rs