Fix null values in DB (#2840)

* Fix album image_files being null.

* Fix small nitpick.

* Use ExecContext instead of Exec.

* Change more columns to not null and set default values.

* Remove columns that don't need to be changed from migration.

* Fix typo.

* Remove unnecessary select statements.

* Remove duplicate code.

* Do not apply changes to radio table.

* Do not apply changes full_text columns and respective indexes.

* Fix musicbrainz columns.

* Rename migration.

* Make ExternalInfoUpdatedAt nullable

* Make Share's timestamps nullable

---------

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
This commit is contained in:
Caio Cotts
2024-02-07 17:45:08 -08:00
committed by GitHub
parent ac4ceab143
commit bf2bcb1279
11 changed files with 693 additions and 84 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ type Share struct {
Username string `structs:"-" json:"username,omitempty"`
Description string `structs:"description" json:"description,omitempty"`
Downloadable bool `structs:"downloadable" json:"downloadable"`
ExpiresAt time.Time `structs:"expires_at" json:"expiresAt,omitempty"`
LastVisitedAt time.Time `structs:"last_visited_at" json:"lastVisitedAt,omitempty"`
ExpiresAt *time.Time `structs:"expires_at" json:"expiresAt,omitempty"`
LastVisitedAt *time.Time `structs:"last_visited_at" json:"lastVisitedAt,omitempty"`
ResourceIDs string `structs:"resource_ids" json:"resourceIds,omitempty"`
ResourceType string `structs:"resource_type" json:"resourceType,omitempty"`
Contents string `structs:"contents" json:"contents,omitempty"`