dorodere / komplett-normale-busliste

Registration system for bus drives, likely not of interest
GNU Affero General Public License v3.0
0 stars 0 forks source link

Database creation #4

Closed dorodere closed 1 year ago

dorodere commented 1 year ago

The database is defined at three places:

https://github.com/dorodere/komplett-normale-busliste/blob/c431dee2072818843bc95059a4199a65ba39571c/docs/database-concept.md?plain=1#L89-L90

https://github.com/dorodere/komplett-normale-busliste/blob/c431dee2072818843bc95059a4199a65ba39571c/scripts/init_db.py#L7-L8

https://github.com/dorodere/komplett-normale-busliste/blob/c431dee2072818843bc95059a4199a65ba39571c/src/tests.rs#L16-L17

Ideally there would be exactly one place to define it, and since the application should just create the DB on first startup, I think that should be inside of the app itself. Maybe switching to sqlx would also be worth investigating.