mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
SQLite model refactoring (#3791)
* Remove ID from PerformerPartial * Separate studio model from sqlite model * Separate movie model from sqlite model * Separate tag model from sqlite model * Separate saved filter model from sqlite model * Separate scene marker model from sqlite model * Separate gallery chapter model from sqlite model * Move ErrNoRows checks into sqlite, improve empty result error messages * Move SQLiteDate and SQLiteTimestamp to sqlite * Use changesetTranslator everywhere, refactor for consistency * Make PerformerStore.DestroyImage private * Fix rating on movie create
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
type NameFinderCreator interface {
|
||||
FindByName(ctx context.Context, name string, nocase bool) (*models.Studio, error)
|
||||
Create(ctx context.Context, newStudio models.Studio) (*models.Studio, error)
|
||||
Create(ctx context.Context, newStudio *models.Studio) error
|
||||
}
|
||||
|
||||
type NameExistsError struct {
|
||||
@@ -53,7 +53,7 @@ func EnsureStudioNameUnique(ctx context.Context, id int, name string, qb Queryer
|
||||
if sameNameStudio != nil && id != sameNameStudio.ID {
|
||||
return &NameUsedByAliasError{
|
||||
Name: name,
|
||||
OtherStudio: sameNameStudio.Name.String,
|
||||
OtherStudio: sameNameStudio.Name,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user