Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use existing consts for table names in anonymise.go where available #5167

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions pkg/sqlite/anonymise.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ func (db *Anonymiser) truncateTable(tableName string) error {

func (db *Anonymiser) deleteBlobs() error {
return utils.Do([]func() error{
func() error { return db.truncateColumn("tags", "image_blob") },
func() error { return db.truncateColumn("studios", "image_blob") },
func() error { return db.truncateColumn("performers", "image_blob") },
func() error { return db.truncateColumn("scenes", "cover_blob") },
func() error { return db.truncateColumn("groups", "front_image_blob") },
func() error { return db.truncateColumn("groups", "back_image_blob") },

func() error { return db.truncateTable("blobs") },
func() error { return db.truncateColumn(tagTable, tagImageBlobColumn) },
func() error { return db.truncateColumn(studioTable, studioImageBlobColumn) },
func() error { return db.truncateColumn(performerTable, performerImageBlobColumn) },
func() error { return db.truncateColumn(sceneTable, sceneCoverBlobColumn) },
func() error { return db.truncateColumn(groupTable, groupFrontImageBlobColumn) },
func() error { return db.truncateColumn(groupTable, groupBackImageBlobColumn) },

func() error { return db.truncateTable(blobTable) },
})
}

Expand All @@ -105,13 +105,13 @@ func (db *Anonymiser) deleteStashIDs() error {

func (db *Anonymiser) clearOHistory() error {
return utils.Do([]func() error{
func() error { return db.truncateTable("scenes_o_dates") },
func() error { return db.truncateTable(scenesODatesTable) },
})
}

func (db *Anonymiser) clearWatchHistory() error {
return utils.Do([]func() error{
func() error { return db.truncateTable("scenes_view_dates") },
func() error { return db.truncateTable(scenesViewDatesTable) },
})
}

Expand Down
Loading