1
Fork 0
Commit Graph

80 Commits

Author SHA1 Message Date
stz184 e70da6bb26 Merge remote-tracking branch 'upstream/master' into use-hash-instead-of-full-path-to-avoid-key-length-maximum 2020-06-24 13:42:43 +03:00
stz184 f88fa33e5f InnoDB has a maximum index length of 767 bytes for tables that use COMPACT or REDUNDANT row format, so for utf8mb3 or utf8mb4 columns, you can index a maximum of 255 or 191 characters, respectively.
That's why I created a new column storing a MD5 hash of the path and made it unique. The MD5 hash has only 32 characters and can be generated natively in MySQL and MariaDB. It helps us to avoid maximum key length and in the same time enforce unique photo and album paths.

- Added path_hash column to photo and album tables
- Added down migration file for 005_utf8_migration (just for consistency)
- Added PathHash field to Album and Photo struct
- album_scanner.go and photo_scanner.goo perform checks by MD5 hash now
2020-06-24 11:43:20 +03:00
viktorstrate b289b25e34 Start on photo favorite 2020-06-17 18:00:58 +02:00
viktorstrate deb2fd9f4f Improve mysql connection retry on ping fail 2020-04-30 15:00:18 +02:00
viktorstrate c5dd3debe5 Add missing new dependency + cleanup 2020-04-15 20:52:08 +02:00
Bruno Sousa c64b4d0d39 make SetupDatabase returns an error and use PingContext with timeout 2020-04-15 16:18:51 +02:00
Viktor Strate Kløvedal 8ad1e11015
Sql 4 bytes utf (#17)
Update UTF migration to use 4 bytes unicode
2020-03-13 20:21:49 +01:00
viktorstrate a65a7bc289 Migrate all database tables to use utf8
Before this, photos and albums with special characters,
would result in a scanner error and would not be imported properly.
2020-03-10 19:03:40 +01:00
viktorstrate e0ada51b6b Decrease max open connections to 80 2020-02-29 10:03:56 +01:00
viktorstrate 8ac9d50cb0 Increase MaxOpenConnections to db to 120 2020-02-29 10:00:11 +01:00
viktorstrate 2f97dcff0c Improve scanner reliability 2020-02-27 16:26:53 +01:00
viktorstrate b10c607f3a Add exif parsing 2020-02-24 23:30:08 +01:00
viktorstrate 39afd67130 Show all root albums instead of the single path
Improve sql connection error messages
2020-02-19 22:04:38 +01:00
viktorstrate b8f960f058 Add docker support for new api 2020-02-19 21:33:28 +01:00
viktorstrate a87e9fc56d Add user management to api 2020-02-16 12:22:00 +01:00
viktorstrate f1ce85dcb5 Set max sql connections + improve user register 2020-02-14 14:29:41 +01:00
viktorstrate a2d0509cad Update scanner to delete removed files 2020-02-12 18:10:52 +01:00
viktorstrate 687b4f4f7f Work on shares 2020-02-11 14:32:35 +01:00
viktorstrate a3a4dda286 Work on share tokens 2020-02-09 21:25:33 +01:00
viktorstrate d50b8034d1 Work on photo serving and processing 2020-02-09 14:21:53 +01:00
viktorstrate 9a8701ecd0 Improve image processing 2020-02-09 12:53:21 +01:00
viktorstrate 517286ff38 Setup initial setup wizard 2020-02-05 16:49:51 +01:00
viktorstrate d81e945b68 Start on image proccessing 2020-02-02 00:29:42 +01:00
viktorstrate a57c111630 Work on scanner 2020-02-01 17:58:45 +01:00
viktorstrate e2049bd6e5 Add sql tables for photos and albums 2020-02-01 14:52:27 +01:00
viktorstrate 9d734af5e2 Implement access token 2020-01-31 18:51:24 +01:00
viktorstrate 0518c0e360 Add user signup 2020-01-31 17:36:48 +01:00
viktorstrate 8a69b1a82c Setup database migration 2020-01-31 15:22:58 +01:00
viktorstrate 3a730fea36 Update env files and move to postgres 2020-01-30 15:10:01 +01:00
viktorstrate 494d880771 Start on mysql 2020-01-30 14:49:39 +01:00