mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
17fa7bb407
extract some error checking and logging in places where linting needed or errors not checked
17 lines
957 B
Go
17 lines
957 B
Go
package db
|
|
|
|
// SetupDBLink is called by main after initialization of the Mysql object to create or return an existing table map
|
|
func SetupDBLink() {
|
|
Mysql.AddTableWithName(APIToken{}, "user__token").SetKeys(false, "id")
|
|
Mysql.AddTableWithName(AccessKey{}, "access_key").SetKeys(true, "id")
|
|
Mysql.AddTableWithName(Environment{}, "project__environment").SetKeys(true, "id")
|
|
Mysql.AddTableWithName(Inventory{}, "project__inventory").SetKeys(true, "id")
|
|
Mysql.AddTableWithName(Project{}, "project").SetKeys(true, "id")
|
|
Mysql.AddTableWithName(Repository{}, "project__repository").SetKeys(true, "id")
|
|
Mysql.AddTableWithName(Task{}, "task").SetKeys(true, "id")
|
|
Mysql.AddTableWithName(TaskOutput{}, "task__output").SetUniqueTogether("task_id", "time")
|
|
Mysql.AddTableWithName(Template{}, "project__template").SetKeys(true, "id")
|
|
Mysql.AddTableWithName(User{}, "user").SetKeys(true, "id")
|
|
Mysql.AddTableWithName(Session{}, "session").SetKeys(true, "id")
|
|
}
|