From bf8dc4cc2c4ee4906a000c1ef577c5a302cf11dd Mon Sep 17 00:00:00 2001 From: Erwan Rouchet <rouchet@teklia.com> Date: Wed, 24 Mar 2021 11:36:42 +0100 Subject: [PATCH] Remove name support in the cache --- arkindex_worker/cache.py | 3 +-- tests/test_cache.py | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arkindex_worker/cache.py b/arkindex_worker/cache.py index 2a36c219..9bb6c0fa 100644 --- a/arkindex_worker/cache.py +++ b/arkindex_worker/cache.py @@ -7,7 +7,6 @@ from arkindex_worker import logger SQL_ELEMENTS_TABLE_CREATION = """CREATE TABLE IF NOT EXISTS elements ( id VARCHAR(32) PRIMARY KEY, parent_id VARCHAR(32), - name TEXT NOT NULL, type TEXT NOT NULL, polygon TEXT, initial BOOLEAN DEFAULT 0 NOT NULL, @@ -17,7 +16,7 @@ SQL_ELEMENTS_TABLE_CREATION = """CREATE TABLE IF NOT EXISTS elements ( CachedElement = namedtuple( "CachedElement", - ["id", "name", "type", "polygon", "worker_version_id", "parent_id", "initial"], + ["id", "type", "polygon", "worker_version_id", "parent_id", "initial"], defaults=[None, 0], ) diff --git a/tests/test_cache.py b/tests/test_cache.py index fde2c681..eb1969b3 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -14,7 +14,6 @@ ELEMENTS_TO_INSERT = [ CachedElement( id=convert_str_uuid_to_hex("11111111-1111-1111-1111-111111111111"), parent_id=convert_str_uuid_to_hex("12341234-1234-1234-1234-123412341234"), - name="0", type="something", polygon=json.dumps([[1, 1], [2, 2], [2, 1], [1, 2]]), worker_version_id=convert_str_uuid_to_hex( @@ -24,7 +23,6 @@ ELEMENTS_TO_INSERT = [ CachedElement( id=convert_str_uuid_to_hex("22222222-2222-2222-2222-222222222222"), parent_id=convert_str_uuid_to_hex("12341234-1234-1234-1234-123412341234"), - name="1", type="something", polygon=json.dumps([[1, 1], [2, 2], [2, 1], [1, 2]]), worker_version_id=convert_str_uuid_to_hex( -- GitLab