Open somelinguist opened 6 years ago
hi @somelinguist ! The documentation is outdated right now, for the SQL backend you don't need to create indexes manually but you can specify them directly in your data models and create the database using backend.create_schema()
. This will use SQLAlchemy to create your tables and initialize all indexes that you've defined.
For an example on how to write data models look here:
https://github.com/quantifiedcode/quantifiedcode/blob/master/quantifiedcode/backend/models
...or here:
https://github.com/quantifiedcode/checkmate/blob/master/checkmate/lib/models.py
You can also use Alembic to migrate your database database schemas (which is very handy when you do changes), for an example also look here:
https://github.com/quantifiedcode/quantifiedcode/tree/master/quantifiedcode/migrations
I'm using the SqlBackend with sqlite. I was able to populate the database, but when I tried to run a query, I got the following error:
I then tried to create an index but go the following error: