#19 As a developer I want to re-factor `createdb` to make it more modular

Otevřený
otevřeno před 1 měsícem uživatelem george · 0 komentářů

Right now (createdb) includes some checks for sqlite3 library availability, database creation, and some output messages to the user. Future changes to the database schema (such as what is needed for #16) need to be added, but we need to separate the creation of the database (with the latest schema) from updating a database to a newer schema.

Consider addressing this by moving the database creation/update routines into a new file that can be (require)'ed by proposal_database.rkt. This new file/module would have:

  • A function to create the proposals table, using the same schema as is presently in the code.
  • One or more functions that provide individual schema updates
  • an (updatedb) function that assesses the schema of the database, determines which updates are needed, and applies them
Right now `(createdb)` includes some checks for sqlite3 library availability, database creation, and some output messages to the user. Future changes to the database schema (such as what is needed for #16) need to be added, but we need to separate the creation of the database (with the latest schema) from updating a database to a newer schema. Consider addressing this by moving the database creation/update routines into a new file that can be `(require)`'ed by `proposal_database.rkt`. This new file/module would have: - A function to create the `proposals` table, using the same schema as is presently in the code. - One or more functions that provide individual schema updates - an `(updatedb)` function that assesses the schema of the database, determines which updates are needed, and applies them
Přihlaste se pro zapojení do konverzace.
Bez milníku
Bez zpracovatele
1 účastníků
Načítání...
Zrušit
Uložit
Není zde žádný obsah.