refactor(shared): rename Org to Instance
This commit is contained in:
@@ -28,11 +28,11 @@ func EnsureCoreIndexes(ctx context.Context, db *mongo.Database) error {
|
||||
return fmt.Errorf("users.email index: %w", err)
|
||||
}
|
||||
|
||||
if _, err := db.Collection("orgs").Indexes().CreateOne(ctx, mongo.IndexModel{
|
||||
if _, err := db.Collection("instances").Indexes().CreateOne(ctx, mongo.IndexModel{
|
||||
Keys: bson.D{{Key: "slug", Value: 1}},
|
||||
Options: options.Index().SetUnique(true),
|
||||
}); err != nil {
|
||||
return fmt.Errorf("orgs.slug index: %w", err)
|
||||
return fmt.Errorf("instances.slug index: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user