~sircmpwn/sr.ht-docs

15494324960ab8eccb87c9867cc45bc990f4444c — Vlad-Stefan Harbuz 14 days ago 3a1ae0d
hacking: update db instructions to use schema.sql

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
2 files changed, 7 insertions(+), 6 deletions(-)

M configuration.md
M hacking.md
M configuration.md => configuration.md +6 -5
@@ 126,11 126,12 @@ its own database login, with full permissions for its database so that it may
manage its own schema migrations.

Once you populate the `connection-string` field in your `config.ini`, you may
use the `<module>-initdb` script to populate the schema and stamp the latest
revision for migrations (e.g., `metasrht-initdb` to set up meta.sr.ht's
database). Note that if you have not configured SSL for your PostgreSQL server,
you may have to append `?sslmode=disable` to your connection string for some
services to work.
use the `schema.sql` file to populate the database (e.g.
`psql -d meta.sr.ht -f schema.sql` to set up meta.sr.ht's database).

Note that if you have not configured SSL for your PostgreSQL server, you may
have to append `?sslmode=disable` to your connection string for some services
to work.

## Schema Upgrades


M hacking.md => hacking.md +1 -1
@@ 71,7 71,7 @@ For each service *except* meta.sr.ht:
For each `SERVICE`:

* `createdb $SERVICE`
* `./$SRV-initdb` (e.g. `./metasrht-initdb`)
* `psql -d $SERVICE -f schema.sql` (e.g. `psql -d meta.sr.ht -f schema.sql`)

To run a service: