Files
postgres-web/pgweb/load_initial_data.sh
Magnus Hagander 291919a69b Add some more fixtures based on current data
This includes most models that just contain "metadata" as well as the
complete feature matrix (because it's useful).

Also add a script to refresh the contents of the fixtures. Still has to
be run manually, but mayeb it helps us keep it slightly more up to date.
2021-05-04 12:39:31 +02:00

16 lines
485 B
Bash
Executable File

#!/bin/bash
# We keep this in a separate script because using initial_data.xxx in django will overwrite
# critical data in the database when running a 'syncdb'. We'd like to keep the ability to
# run syncdb on updates...
echo WARNING: this may overwrite some data in the database with an initial set of data.
echo 'Are you sure you want this (answer "yes" to overwrite)'
read R
cd $(dirname $0)
if [ "$R" == "yes" ]; then
find . -name data.json | xargs ../manage.py loaddata
fi