Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No init command/way to create tables from scratch #44

Open
christhompson opened this issue Mar 26, 2017 · 0 comments
Open

No init command/way to create tables from scratch #44

christhompson opened this issue Mar 26, 2017 · 0 comments

Comments

@christhompson
Copy link
Owner

Due to a complete lack of actually using this code path more than once, there is no clear way to create a new lore database from scratch.

One could work around this by trying to import an empty file, but import currently only creates the Lore table, so this would break with the recent addition of tags.

Note to self: Write some tests for this stuff in particular so it doesn't break again in the future.

A couple options for building this that come to mind:

  • If there is no lore.db file, create it and create the tables (on startup)
  • Create a setup.py type script that creates and initializes the database file
  • Add an init command that creates the tables (if they don't already exist -- check if Model.create_table() is destructive)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant