Skip to content
Snippets Groups Projects
Commit 87c22ce1 authored by Eva Bardou's avatar Eva Bardou :frog:
Browse files

Add a reminder to upgrade cache version when its structure is updated

parent 0744454a
No related branches found
No related tags found
1 merge request!462Add a reminder to upgrade cache version when its structure is updated
Pipeline #146651 passed
......@@ -53,6 +53,9 @@ def test_create_tables(tmp_path):
init_cache_db(db_path)
create_tables()
# WARNING: If you are updating this schema following a development you have made
# in base-worker, make sure to upgrade the arkindex_worker.cache.SQL_VERSION in
# the same merge request as your changes.
expected_schema = """CREATE TABLE "classifications" ("id" TEXT NOT NULL PRIMARY KEY, "element_id" TEXT NOT NULL, "class_name" TEXT NOT NULL, "confidence" REAL NOT NULL, "state" VARCHAR(10) NOT NULL, "worker_run_id" TEXT, FOREIGN KEY ("element_id") REFERENCES "elements" ("id"))
CREATE TABLE "dataset_elements" ("id" TEXT NOT NULL PRIMARY KEY, "element_id" TEXT NOT NULL, "dataset_id" TEXT NOT NULL, "set_name" VARCHAR(255) NOT NULL, FOREIGN KEY ("element_id") REFERENCES "elements" ("id"), FOREIGN KEY ("dataset_id") REFERENCES "datasets" ("id"))
CREATE TABLE "datasets" ("id" TEXT NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "state" VARCHAR(255) NOT NULL DEFAULT 'open', "sets" TEXT NOT NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment