photoprism/internal/entity/db_fixtures.go
2021-11-21 14:05:07 +01:00

23 lines
520 B
Go

package entity
// CreateDefaultFixtures inserts default fixtures for test and production.
func CreateDefaultFixtures() {
CreateUnknownAddress()
CreateDefaultUsers()
CreateUnknownPlace()
CreateUnknownLocation()
CreateUnknownCountry()
CreateUnknownCamera()
CreateUnknownLens()
}
// ResetTestFixtures re-creates registered database tables and inserts test fixtures.
func ResetTestFixtures() {
Entities.Migrate()
Entities.WaitForMigration()
Entities.Truncate()
CreateDefaultFixtures()
CreateTestFixtures()
}