mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
SQLite model refactoring, part 2 (#3839)
* Treat empty image input as null * Add validation to models.Date * Allow zero dates in database * Make scene_markers.scene_id non-nullable * Drop scraped_items table * Remove movie/studio checksum * Add migration notes --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -69,8 +69,8 @@ func Test_PerformerStore_Create(t *testing.T) {
|
||||
createdAt = time.Date(2001, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
updatedAt = time.Date(2001, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
|
||||
birthdate = models.NewDate("2003-02-01")
|
||||
deathdate = models.NewDate("2023-02-01")
|
||||
birthdate, _ = models.ParseDate("2003-02-01")
|
||||
deathdate, _ = models.ParseDate("2023-02-01")
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
@@ -217,8 +217,8 @@ func Test_PerformerStore_Update(t *testing.T) {
|
||||
createdAt = time.Date(2001, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
updatedAt = time.Date(2001, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
|
||||
birthdate = models.NewDate("2003-02-01")
|
||||
deathdate = models.NewDate("2023-02-01")
|
||||
birthdate, _ = models.ParseDate("2003-02-01")
|
||||
deathdate, _ = models.ParseDate("2023-02-01")
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
@@ -400,8 +400,8 @@ func Test_PerformerStore_UpdatePartial(t *testing.T) {
|
||||
createdAt = time.Date(2001, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
updatedAt = time.Date(2001, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
|
||||
birthdate = models.NewDate("2003-02-01")
|
||||
deathdate = models.NewDate("2023-02-01")
|
||||
birthdate, _ = models.ParseDate("2003-02-01")
|
||||
deathdate, _ = models.ParseDate("2023-02-01")
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
|
||||
Reference in New Issue
Block a user