Postgres trigger functions currently insert and upsert only. If you need to drop records from the database, here's a workaround:
droptableifexistsexportdroptableifexistspagedroptableifexistsblockRun that to purge the DB then rerun setup.sql to start fresh.
The vision for the db is to add a closure table to define the graph hierarchy and a related table to define block order. Bill Karwin is the expert and has left quite a bit of reference material on SO as well as some videos in various talks on YouTube.
Postgres trigger functions currently insert and upsert only. If you need to drop records from the database, here's a workaround:
```sql
drop table if exists export
drop table if exists page
drop table if exists block
```
Run that to purge the DB then rerun `setup.sql` to start fresh.
The vision for the db is to add a closure table to define the graph hierarchy and a related table to define block order. Bill Karwin is the expert and has left quite a bit of [reference material on SO](https://stackoverflow.com/questions/49700342/closure-table-equivalent-for-graph-structures-in-sql) as well as some videos in various talks on YouTube.