Commit graph

164 commits

Author SHA1 Message Date
Michael Mayer 3c47a85ea5 Backend: Move UpdatePhotoCounts() to entity package
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-11 11:01:28 +02:00
Michael Mayer 4fbed12e94 Backend: Skip archived photos while indexing #300
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-11 08:57:58 +02:00
Michael Mayer 923093042a Purge: Improve photo counts and logging
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-11 07:23:23 +02:00
Michael Mayer 8ccaaff4e5 Backend: Update label photo count and refactor entity fixtures
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-10 19:43:49 +02:00
Michael Mayer 4beeebe5cc Backend: Add Hidden column to PhotoAlbum
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-09 21:00:02 +02:00
Michael Mayer 252e67ce03 Add photo_count column to labels table
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-09 11:00:22 +02:00
Michael Mayer 3aad02501f Run unit tests in separate databases to avoid conflicts
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 19:34:29 +02:00
Michael Mayer 2f28c6840e Backend: Try migrations a second time if they fail
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 18:18:19 +02:00
Michael Mayer 40b7a1285f Backend: Reduce db migration error log level to debug
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 18:02:53 +02:00
Michael Mayer c5dbe1bc14 Backend: Refactor database migration
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 17:45:32 +02:00
Michael Mayer 94dfb3cd19 Add WaitForMigration() function to avoid db test failures
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 16:36:09 +02:00
Michael Mayer 05d9187167 Update count in places are restoring photos #234
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 16:01:34 +02:00
Theresa Gresch aaf1ff64ad Backend: Add tests to internal/entity 2020-05-08 15:46:16 +02:00
Michael Mayer 842da9f09b Backend: Query package refactoring
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 15:41:01 +02:00
Theresa Gresch 0d0ba28331 Backend: Add tests to internal/entity 2020-05-08 14:18:11 +02:00
Michael Mayer 1894b4440f Detect and report photos without primary file, e.g. after purging #234
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 12:01:28 +02:00
Michael Mayer 3288ede6e6 Simplify Purge() function #234
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 12:01:28 +02:00
Theresa Gresch dc23632556 Backend: Add tests to internal/entity 2020-05-08 11:46:09 +02:00
Theresa Gresch a136945470 Backend: Add tests to internal/entity 2020-05-08 10:21:03 +02:00
Michael Mayer c0c0c96c30 Remove primary flag for missing files #234
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 09:36:34 +02:00
Michael Mayer 979a5f5c76 Code clean-up and refactoring of purge command #234
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-07 21:55:34 +02:00
Michael Mayer 252672b291 Run purge after indexing files in Web UI #234
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-07 21:46:00 +02:00
Michael Mayer f0187df4a1 Purge command to remove missing files from the index #234
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-07 19:42:04 +02:00
Theresa Gresch 5c0d12c4d9 Backend: Add tests to internal/entity 2020-05-07 18:08:12 +02:00
Theresa Gresch 4c6aec9912 Backend: Add tests to internal/entity 2020-05-07 17:29:35 +02:00
Theresa Gresch a0465e0e10 Backend: Add tests to internal/entity 2020-05-07 16:45:33 +02:00
Michael Mayer 1479a3ec5b Refactor indexer so that thumbs and jpegs can be created on demand #258
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-06 10:35:41 +02:00
Theresa Gresch b16216819b Backend: Add test fixtures 2020-05-05 09:28:30 +02:00
Theresa Gresch 5388b785bf Backend: Add tests to internal/api 2020-05-04 17:54:42 +02:00
Theresa Gresch 6e2062ea4b Backend: Add tests to api/labels 2020-05-04 16:02:49 +02:00
Michael Mayer 2032b40f2b Backend: Code clean-up
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-03 18:00:50 +02:00
Theresa Gresch d81fe794eb Backend: Add label fixtures 2020-05-03 17:26:26 +02:00
Theresa Gresch 6edb578b34 Backend: Add test fixtures 2020-05-01 14:18:51 +02:00
Theresa Gresch 9e343cef04 Backend: Add fixtures for files 2020-05-01 14:18:51 +02:00
Theresa Gresch 409cea4659 Backend: Add fixtures for photokeywords 2020-05-01 14:18:51 +02:00
Theresa Gresch 5d2c4fa5d6 Backend: Add fixtures for photolabels 2020-05-01 14:18:51 +02:00
Theresa Gresch c0a37ca36a Backend: Add fixtures photoalbum 2020-05-01 14:18:51 +02:00
Theresa Gresch 0008f68b71 Backend: Add fixtures for links 2020-05-01 14:18:51 +02:00
Theresa Gresch 5f33848b14 Backend: Add fixtures for keywords 2020-05-01 14:18:51 +02:00
Theresa Gresch 3127eef80f Backend: Add fixtures for categories 2020-05-01 14:18:51 +02:00
Theresa Gresch 5c86f02106 Backend: Add test fixtures for albums 2020-05-01 14:18:51 +02:00
Theresa Gresch 434948d57a Backend: Add test fixtures for photos 2020-05-01 14:18:51 +02:00
Theresa Gresch 9234c5797a Backend: Add test fixtures for labels 2020-05-01 14:18:50 +02:00
Theresa Gresch 6188c7f736 Backend: Add test fixtures for countries 2020-05-01 14:18:50 +02:00
Theresa Gresch 785d433ba9 Backend: Add test fixtures for cameras 2020-05-01 14:18:50 +02:00
Michael Mayer 59f1c0d786 Backend: Code clean-up
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-01 13:54:47 +02:00
Michael Mayer e3356aa79b Backend: Don't regenerate existing unique IDs
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-01 12:57:26 +02:00
Michael Mayer b4a04a478f Backend: Set test database using PHOTOPRISM_TEST_DSN
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-04-30 22:39:38 +02:00
Michael Mayer f8de34dac7 Backend: Add account fixtures
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-04-30 22:25:53 +02:00
Michael Mayer c30476f120 Backend: Refactor test db initialization
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-04-30 21:21:09 +02:00