lens @ a98acb9c8b86a2c2f35841c86d3c3f1d7c176b61

 1package sql
 2
 3import "gorm.io/gorm"
 4
 5func Migrate(db *gorm.DB) error {
 6	for _, m := range []any{
 7		&User{},
 8		&Settings{},
 9		&Media{},
10		&MediaEXIF{},
11		&MediaThumbnail{},
12		&MediaAlbum{},
13		&MediaAlbumFile{},
14	} {
15		if err := db.AutoMigrate(m); err != nil {
16			return err
17		}
18	}
19	return nil
20}