mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
refactor: code cleanup
This commit is contained in:
@@ -76,11 +76,6 @@ func CreateIndexesV2() {
|
||||
{Keys: bson.M{"name": 1}},
|
||||
})
|
||||
|
||||
// variables
|
||||
mongo.GetMongoCol(service.GetCollectionNameByInstance(models2.VariableV2{})).MustCreateIndexes([]mongo2.IndexModel{
|
||||
{Keys: bson.M{"key": 1}},
|
||||
})
|
||||
|
||||
// data sources
|
||||
mongo.GetMongoCol(service.GetCollectionNameByInstance(models2.DatabaseV2{})).MustCreateIndexes([]mongo2.IndexModel{
|
||||
{Keys: bson.M{"name": 1}},
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
package models
|
||||
|
||||
type VariableV2 struct {
|
||||
any `collection:"variables"`
|
||||
BaseModelV2[VariableV2] `bson:",inline"`
|
||||
Key string `json:"key" bson:"key"`
|
||||
Value string `json:"value" bson:"value"`
|
||||
Remark string `json:"remark" bson:"remark"`
|
||||
}
|
||||
Reference in New Issue
Block a user