2021-11-21 14:05:07 +01:00
|
|
|
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() {
|
2021-11-28 13:52:27 +01:00
|
|
|
Entities.Migrate(Db(), false)
|
|
|
|
Entities.WaitForMigration(Db())
|
|
|
|
Entities.Truncate(Db())
|
2021-11-21 14:05:07 +01:00
|
|
|
|
|
|
|
CreateDefaultFixtures()
|
|
|
|
|
|
|
|
CreateTestFixtures()
|
|
|
|
}
|