feat: revision-check material writes
- add jz_bm_materials.revision (default 1), read-only for GORM
- bump it only on content changes (models.ReviseMaterial)
- PUT /materials/{id} locks the row and answers 409 to a stale revision
- management answers carry revision and updated_at, the student detail
carries revision
This commit is contained in:
@@ -79,8 +79,8 @@ func TestPluginActivates(t *testing.T) {
|
||||
if n := len(p.Models()); n != 14 {
|
||||
t.Errorf("Models = %d, want 14", n)
|
||||
}
|
||||
if n := len(p.Migrations()); n != 21 {
|
||||
t.Errorf("Migrations = %d, want 21", n)
|
||||
if n := len(p.Migrations()); n != 22 {
|
||||
t.Errorf("Migrations = %d, want 22", n)
|
||||
}
|
||||
if !slices.ContainsFunc(p.Commands(), func(c bonfire.Command) bool { return c.Name == "bm:seed" }) {
|
||||
t.Error("bm:seed is not registered")
|
||||
|
||||
Reference in New Issue
Block a user