Anglepi / My-Many-Reads

Browse books, manage your reads list and find recommendations based on your likings and other users opinions.
GNU General Public License v3.0
3 stars 0 forks source link

Db structure fix and queries good practices #100

Closed Anglepi closed 1 year ago

Anglepi commented 1 year ago

Updated the init_db.sql script to change date column types to date. For the already created DB, I used the following script to alter the tables:

alter table <tablename> alter column <columnname> type DATE using to_date(<columnname>, 'YYYY-MM-DD');

After doing that, I noticed one of the unit tests was failing due to the query output order, so I created #99 and made sure every getter query has an explicit order that makes sense.

Closes #97 closes #99