Skip to content

Commit

Permalink
Add option for dbsetup with keys but no fixtures
Browse files Browse the repository at this point in the history
When creating a new database for sync, we want to set up the schema,
including the keys, but without any fixture data. This approach of
adding an option to setup.sh and the elif to add keys only is not ideal,
but need to leave any build automation working as-is. We should really
treat all of this and ensure that the logical and naming implications
are accurate and appropriate (e.g., "root" really means "create the
database and grant" and "all" really means "load fixture data").
  • Loading branch information
botimer committed May 29, 2024
1 parent c820c05 commit eeb5d37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ do
h)h=${OPTARG};;
P)P=${OPTARG};;
a)all="true";;
k)keys="true";;
r)root="false";;
b)debug="true";;
esac
Expand Down Expand Up @@ -52,4 +53,6 @@ if [[ $all == "true" ]]; then
mariadb --user=$user --host=$host --port=$port --password=$password $database < "$directory/network.sql"
mariadb --user=$user --host=$host --port=$port --password=$password $database < "$directory/delegation.sql"
mariadb --user=$user --host=$host --port=$port --password=$password $database < "$directory/projection.sql"
elif [[ $keys == "true" ]]; then
mariadb --user=$user --host=$host --port=$port --password=$password $database < "$directory/keys.sql"
fi

0 comments on commit eeb5d37

Please sign in to comment.