MIGRATIONS.md (1544B)
1 # Migrations 2 3 This documents migrations for breaking database changes. These are intended to be as few as 4 possible, but sometimes they are necessary. 5 6 ## [2024-07-20] Private threads 7 8 Add a column to `database.Thread` to signal whether or not the thread is private. 9 10 For more details, see [database/migrations.go](./database/migrations.go). 11 12 Build and then run the migration tool in `cmd/migration-tool` accordingly: 13 14 ``` 15 cd cmd/migration-tool 16 go build 17 ./migration-tool --database path-to-your-forum.db --migration 2024-02-thread-private-migration 18 ``` 19 20 ## [2024-01-16] Migrating password hash libraries 21 22 To support 32 bit architectures, such as running Cerca on an older Raspberry Pi, the password 23 hashing library used previously 24 [github.com/synacor/argon2id](https://github.com/synacor/argon2id) was swapped out for 25 [github.com/matthewhartstonge/argon2](https://github.com/matthewhartstonge/argon2). 26 27 The password hashing algorithm remains the same, so users **do not** need to reset their 28 password, but the old encoding format needed migrating in the database. 29 30 The new library also has a stronger default time parameter, which will be used for new 31 passwords while old passwords will use the time parameter stored together with their 32 database record. 33 34 For more details, see [database/migrations.go](./database/migrations.go). 35 36 Build and then run the migration tool in `cmd/migration-tool` accordingly: 37 38 ``` 39 cd cmd/migration-tool 40 go build 41 ./migration-tool --database path-to-your-forum.db --migration 2024-01-password-hash-migration 42 ``` 43 44