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

오픈
george1 개월 전을 오픈 · 0개의 코멘트

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
로그인하여 이 대화에 참여
마일스톤 없음
담당자 없음
참여자 1명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.