mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-28 17:50:56 +01:00
🚀 feat: add IsDefault field to DatabaseV2 model
🔨 refactor: modify GetDatabaseList, GetDatabaseById, PostDatabaseTestConnection, and GetDatabaseMetadata functions 🐞 fix: GetDatabaseById and GetMetadata functions in MongoService 🔧 chore: add GetDefaultDatabase and GetDatabaseById functions to utils file
This commit is contained in:
@@ -12,6 +12,7 @@ type Database struct {
|
||||
type DatabaseTable struct {
|
||||
Name string `json:"name"`
|
||||
Columns []DatabaseColumn `json:"columns"`
|
||||
Indexes []DatabaseIndex `json:"indexes"`
|
||||
}
|
||||
|
||||
type DatabaseColumn struct {
|
||||
@@ -23,3 +24,15 @@ type DatabaseColumn struct {
|
||||
Extra string `json:"extra,omitempty"`
|
||||
Children []DatabaseColumn `json:"children,omitempty"`
|
||||
}
|
||||
|
||||
type DatabaseIndex struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Columns []DatabaseIndexColumn `json:"columns"`
|
||||
Unique bool `json:"unique"`
|
||||
}
|
||||
|
||||
type DatabaseIndexColumn struct {
|
||||
Name string `json:"name"`
|
||||
Order int `json:"order"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user