#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 名参与者
正在加载...
取消
保存
这个人很懒,什么都没留下。