diff --git a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt index 41d861dee1..db96f6068e 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt @@ -563,11 +563,19 @@ public class CacheImporter @Inject constructor( connection.prepareStatement( """ - INSERT INTO indexes (container_id) - VALUES (?) + INSERT INTO indexes ( + container_id, protocol, version, has_names, has_digests, has_lengths, has_uncompressed_checksums + ) + VALUES (?, ?, ?, ?, ?, ?, ?) """.trimIndent() ).use { stmt -> stmt.setLong(1, containerId) + stmt.setInt(2, index.index.protocol.id) + stmt.setInt(3, index.index.version) + stmt.setBoolean(4, index.index.hasNames) + stmt.setBoolean(5, index.index.hasDigests) + stmt.setBoolean(6, index.index.hasLengths) + stmt.setBoolean(7, index.index.hasUncompressedChecksums) try { stmt.execute() diff --git a/archive/src/main/resources/org/openrs2/archive/V1__init.sql b/archive/src/main/resources/org/openrs2/archive/V1__init.sql index 9c9dfc5db8..18ce60506d 100644 --- a/archive/src/main/resources/org/openrs2/archive/V1__init.sql +++ b/archive/src/main/resources/org/openrs2/archive/V1__init.sql @@ -57,7 +57,13 @@ CREATE TABLE groups ( ); CREATE TABLE indexes ( - container_id BIGINT PRIMARY KEY NOT NULL REFERENCES containers (id) + container_id BIGINT PRIMARY KEY NOT NULL REFERENCES containers (id), + protocol uint1 NOT NULL, + version INTEGER NOT NULL, + has_names BOOLEAN NOT NULL, + has_digests BOOLEAN NOT NULL, + has_lengths BOOLEAN NOT NULL, + has_uncompressed_checksums BOOLEAN NOT NULL ); CREATE TABLE index_groups (