docs
docs copied to clipboard
Document setting up full text search
The database schema generated through the migrations do not support FTS. The indexes must be created manually:
ALTER TABLE judge_problem ADD FULLTEXT(code, name, description);
Would a simple
migrations.RunSQL("ALTER TABLE judge_problem ADD FULLTEXT(code, name, description);")
Added to a new migration not just do the trick?
Would a simple
migrations.RunSQL("ALTER TABLE judge_problem ADD FULLTEXT(code, name, description);")Added to a new migration not just do the trick?
RIP anyone who uses SQLite for basic local development then.
Would a simple
migrations.RunSQL("ALTER TABLE judge_problem ADD FULLTEXT(code, name, description);")Added to a new migration not just do the trick?
RIP anyone who uses SQLite for basic local development then.
Oop true, a RunPython which checks the database configuration and then runs the SQL using db.connection.... could be used instead then.
Oop true, a RunPython which checks the database configuration and then runs the SQL using
db.connection....could be used instead then.
You should use the schema editor, but sure, PRs welcome.
Would a simple
migrations.RunSQL("ALTER TABLE judge_problem ADD FULLTEXT(code, name, description);")Added to a new migration not just do the trick?
RIP anyone who uses SQLite for basic local development then.
This is already not possible due to https://github.com/DMOJ/online-judge/blob/27f5a0e2e308e73a9fb1bf4ac264c1cbc6d1677a/judge/migrations/0089_submission_to_contest.py#L19 running an INNER JOIN in a format which SQLITE does not accept.