lens @ e359eaaebd7270476075ca9e08b7b53fb9e69f24

 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	} {
13		if err := db.AutoMigrate(m); err != nil {
14			return err
15		}
16	}
17	return nil
18}