fix schema.sh again

master
Aevann 2023-10-09 00:33:50 +03:00
parent f5fd2854dd
commit 37a9cdeaf5
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ sed -i -E "s/INSERT INTO public.hat_defs VALUES \(.*, [0-9]{1,6}, [0-9]{10}\);//
#generate seed-emojis.sql
EXPORT_EMOJIS=$(psql --csv --tuples-only -P "null=NULL" -c \
"SELECT ''''||name||'''', ''''||kind||'''', 2, ''''||tags||'''', nsfw FROM emojis WHERE submitter_id IS NULL ORDER BY name" \
"SELECT ''''||name||'''', ''''||kind||'''', 2, ''''||tags||'''', ''||nsfw||'' FROM emojis WHERE submitter_id IS NULL ORDER BY name" \
"$DATABASE_URL")
EXPORT_EMOJIS=$(sed 's/.*/\(&\),/' <<< "$EXPORT_EMOJIS")
echo "INSERT INTO public.emojis (name, kind, author_id, tags, nsfw) VALUES" > "/d/seed-emojis.sql"