mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 23:39:56 +01:00
b2eb39d605
- Remove mandrill - Remove redis - Sessions & more transparency into who's logged into your user - Session is stored in cookies (map of two integers.) - Encrypted sessions, configurable keys (auto-generated)
18 lines
1002 B
Go
18 lines
1002 B
Go
package models
|
|
|
|
import "github.com/ansible-semaphore/semaphore/database"
|
|
|
|
func SetupDBLink() {
|
|
database.Mysql.AddTableWithName(APIToken{}, "user__token").SetKeys(false, "id")
|
|
database.Mysql.AddTableWithName(AccessKey{}, "access_key").SetKeys(true, "id")
|
|
database.Mysql.AddTableWithName(Environment{}, "project__environment").SetKeys(true, "id")
|
|
database.Mysql.AddTableWithName(Inventory{}, "project__inventory").SetKeys(true, "id")
|
|
database.Mysql.AddTableWithName(Project{}, "project").SetKeys(true, "id")
|
|
database.Mysql.AddTableWithName(Repository{}, "project__repository").SetKeys(true, "id")
|
|
database.Mysql.AddTableWithName(Task{}, "task").SetKeys(true, "id")
|
|
database.Mysql.AddTableWithName(TaskOutput{}, "task__output").SetUniqueTogether("task_id", "time")
|
|
database.Mysql.AddTableWithName(Template{}, "project__template").SetKeys(true, "id")
|
|
database.Mysql.AddTableWithName(User{}, "user").SetKeys(true, "id")
|
|
database.Mysql.AddTableWithName(Session{}, "session").SetKeys(true, "id")
|
|
}
|