Closed dorodere closed 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.
sqlx
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.