Skip to content

Commit c17b29a

Browse files
authored
Remove stored meshes feature from backend and postgres (#8554)
* Remove stored meshes feature from backend and postgres * migration guide * remove unused mesh-related messages entries
1 parent ed84b5c commit c17b29a

File tree

8 files changed

+29
-240
lines changed

8 files changed

+29
-240
lines changed

MIGRATIONS.unreleased.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ User-facing changes are documented in the [changelog](CHANGELOG.released.md).
99
[Commits](https://github.com/scalableminds/webknossos/compare/25.05.0...HEAD)
1010

1111
### Postgres Evolutions:
12+
<<<<<<< HEAD
13+
1214
- [131-more-indices-on-users.sql](conf/evolutions/131-more-indices-on-users.sql)
15+
- [132-remove-stored-meshes.sql](conf/evolutions/132-remove-stored-meshes.sql)

app/controllers/MeshController.scala

Lines changed: 0 additions & 83 deletions
This file was deleted.

app/models/mesh/Mesh.scala

Lines changed: 0 additions & 125 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
do $$ begin ASSERT (select schemaVersion from webknossos.releaseInformation) = 131, 'Previous schema version mismatch'; end; $$ LANGUAGE plpgsql;
2+
3+
DROP VIEW webknossos.meshes_;
4+
DROP TABLE webknossos.meshes;
5+
6+
UPDATE webknossos.releaseInformation SET schemaVersion = 132;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
do $$ begin ASSERT (select schemaVersion from webknossos.releaseInformation) = 132, 'Previous schema version mismatch'; end; $$ LANGUAGE plpgsql;
2+
3+
4+
CREATE TABLE webknossos.meshes(
5+
_id TEXT CONSTRAINT _id_objectId CHECK (_id ~ '^[0-9a-f]{24}$') PRIMARY KEY,
6+
_annotation TEXT CONSTRAINT _annotation_objectId CHECK (_annotation ~ '^[0-9a-f]{24}$') NOT NULL,
7+
description TEXT NOT NULL DEFAULT '',
8+
position webknossos.VECTOR3 NOT NULL,
9+
data TEXT,
10+
created TIMESTAMPTZ NOT NULL DEFAULT NOW(),
11+
isDeleted BOOLEAN NOT NULL DEFAULT false
12+
);
13+
14+
CREATE VIEW webknossos.meshes_ AS SELECT * FROM webknossos.meshes WHERE NOT isDeleted;
15+
16+
ALTER TABLE webknossos.meshes
17+
ADD CONSTRAINT annotation_ref FOREIGN KEY(_annotation) REFERENCES webknossos.annotations(_id) DEFERRABLE;
18+
19+
UPDATE webknossos.releaseInformation SET schemaVersion = 131;

conf/messages

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -260,19 +260,9 @@ annotation.editableMapping.getAgglomerateGraph.failed=Could not look up an agglo
260260
annotation.editableMapping.getAgglomerateIdsForSegments.failed=Could not look up agglomerate ids for requested segments.
261261
annotation.duplicate.failed=Failed to duplicate annotation
262262

263-
mesh.notFound=Mesh could not be found
264-
mesh.write.failed=Failed to convert mesh info to json
265-
mesh.create.failed=Failed to save mesh info
266-
mesh.update.failed=Failed to update mesh info
267-
mesh.data.get.failed=Failed to load mesh raw data
268-
mesh.data.read.failed=Failed to convert mesh raw data for saving
269-
mesh.data.save.failed=Failed to save mesh raw data
270-
mesh.delete.failed=Failed to delete mesh
271-
mesh.file.load.failed=Failed to load mesh for segment {0}
272263
mesh.file.listChunks.failed=Failed to load chunk list for segment {0} from mesh file “{1}”
273264
mesh.file.loadChunk.failed=Failed to load mesh chunk for segment
274265
mesh.file.open.failed=Failed to open mesh file for reading
275-
mesh.file.readData.failed=Failed to read data from mesh file
276266
mesh.file.readEncoding.failed=Failed to read encoding from mesh file
277267

278268
task.create.noTasks=Zero tasks were requested

conf/webknossos.latest.routes

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,6 @@ PUT /zarrPrivateLinks/:id
177177
DELETE /zarrPrivateLinks/:id controllers.AnnotationPrivateLinkController.delete(id: ObjectId)
178178
GET /zarrPrivateLinks/:id controllers.AnnotationPrivateLinkController.get(id: ObjectId)
179179

180-
# Meshes
181-
POST /meshes controllers.MeshController.create()
182-
PUT /meshes/:id controllers.MeshController.update(id: ObjectId)
183-
DELETE /meshes/:id controllers.MeshController.delete(id: ObjectId)
184-
GET /meshes/:id controllers.MeshController.get(id: ObjectId)
185-
PUT /meshes/:id/data controllers.MeshController.updateData(id: ObjectId)
186-
GET /meshes/:id/data controllers.MeshController.getData(id: ObjectId)
187-
188180
# Tasks
189181
POST /tasks controllers.TaskController.create()
190182
POST /tasks/createFromFiles controllers.TaskController.createFromFiles()

tools/postgres/schema.sql

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CREATE TABLE webknossos.releaseInformation (
2121
schemaVersion BIGINT NOT NULL
2222
);
2323

24-
INSERT INTO webknossos.releaseInformation(schemaVersion) values(131);
24+
INSERT INTO webknossos.releaseInformation(schemaVersion) values(132);
2525
COMMIT TRANSACTION;
2626

2727

@@ -82,16 +82,6 @@ CREATE TABLE webknossos.annotation_mutexes(
8282
expiry TIMESTAMP NOT NULL
8383
);
8484

85-
CREATE TABLE webknossos.meshes(
86-
_id TEXT CONSTRAINT _id_objectId CHECK (_id ~ '^[0-9a-f]{24}$') PRIMARY KEY,
87-
_annotation TEXT CONSTRAINT _annotation_objectId CHECK (_annotation ~ '^[0-9a-f]{24}$') NOT NULL,
88-
description TEXT NOT NULL DEFAULT '',
89-
position webknossos.VECTOR3 NOT NULL,
90-
data TEXT,
91-
created TIMESTAMPTZ NOT NULL DEFAULT NOW(),
92-
isDeleted BOOLEAN NOT NULL DEFAULT FALSE
93-
);
94-
9585
CREATE TABLE webknossos.publications(
9686
_id TEXT PRIMARY KEY,
9787
publicationDate TIMESTAMPTZ,
@@ -740,7 +730,6 @@ CREATE TABLE webknossos.analyticsEvents(
740730

741731

742732
CREATE VIEW webknossos.annotations_ AS SELECT * FROM webknossos.annotations WHERE NOT isDeleted;
743-
CREATE VIEW webknossos.meshes_ AS SELECT * FROM webknossos.meshes WHERE NOT isDeleted;
744733
CREATE VIEW webknossos.publications_ AS SELECT * FROM webknossos.publications WHERE NOT isDeleted;
745734
CREATE VIEW webknossos.datasets_ AS SELECT * FROM webknossos.datasets WHERE NOT isDeleted;
746735
CREATE VIEW webknossos.dataStores_ AS SELECT * FROM webknossos.dataStores WHERE NOT isDeleted;
@@ -823,8 +812,6 @@ ALTER TABLE webknossos.annotation_contributors
823812
ALTER TABLE webknossos.annotation_mutexes
824813
ADD CONSTRAINT annotation_ref FOREIGN KEY(_annotation) REFERENCES webknossos.annotations(_id) ON DELETE CASCADE DEFERRABLE,
825814
ADD CONSTRAINT user_ref FOREIGN KEY(_user) REFERENCES webknossos.users(_id) ON DELETE CASCADE DEFERRABLE;
826-
ALTER TABLE webknossos.meshes
827-
ADD CONSTRAINT annotation_ref FOREIGN KEY(_annotation) REFERENCES webknossos.annotations(_id) DEFERRABLE;
828815
ALTER TABLE webknossos.datasets
829816
ADD CONSTRAINT organization_ref FOREIGN KEY(_organization) REFERENCES webknossos.organizations(_id) DEFERRABLE,
830817
ADD CONSTRAINT dataStore_ref FOREIGN KEY(_dataStore) REFERENCES webknossos.dataStores(name) DEFERRABLE,

0 commit comments

Comments
 (0)