#29 Validate DB schema in `check_database`

Open
opened 4 years ago by abrax · 0 comments
abrax commented 4 years ago

table_exists will only check if there’s a table with that name, and returns true even if columns are wrong.

This is okay for now since I don’t see how a table without the right columns could happen except if the user fucked with the DB manually, in which case he should know enough to fix it himself.

This will be a real problem if you ever change the schema in later versions. When that happens, use something like peewee-validates to validate the schema.

`table_exists` will only check if there's a table with that name, and returns true even if columns are wrong. This is okay for now since I don't see how a table without the right columns could happen except if the user fucked with the DB manually, in which case he should know enough to fix it himself. This will be a real problem if you ever change the schema in later versions. When that happens, use something like `peewee-validates` to validate the schema.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.