yjp 1 rok pred
rodič
commit
88dfa83d9f

+ 0 - 1
client/client.go

@@ -12,7 +12,6 @@ func IsErrorDBRecordNotExist(err error) bool {
 
 type Client interface {
 	AutoMigrate(request *AutoMigrateRequest) error
-	AutoMigrateBatch(request *AutoMigrateBatchRequest) error
 	Transaction(txFunc TransactionFunc) error
 	Insert(request *InsertRequest) (string, error)
 	InsertBatch(request *InsertBatchRequest) (string, error)

+ 0 - 4
client/client_cmd_request.go

@@ -1,10 +1,6 @@
 package client
 
 type AutoMigrateRequest struct {
-	AutoMigrateItem
-}
-
-type AutoMigrateBatchRequest struct {
 	Items []AutoMigrateItem
 }
 

+ 1 - 20
dpsv1/client.go

@@ -58,25 +58,6 @@ func DestroyClient(client *Client) error {
 }
 
 func (c *Client) AutoMigrate(req *client.AutoMigrateRequest) error {
-	tableModelDescribeJsonBytes, err := json.Marshal(req.TableModelDescribe)
-	if err != nil {
-		return err
-	}
-
-	_, err = c.commandServiceClient.AutoMigrate(context.Background(), &request.AutoMigrateRequest{
-		DatabaseID:            c.databaseID,
-		TablePrefixWithSchema: req.TablePrefixWithSchema,
-		Version:               req.Version,
-		TableModelDescribe:    tableModelDescribeJsonBytes,
-	})
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (c *Client) AutoMigrateBatch(req *client.AutoMigrateBatchRequest) error {
 	items := make([]*request.AutoMigrateItem, 0)
 	for _, reqItem := range req.Items {
 		tableModelDescribeJsonBytes, err := json.Marshal(reqItem.TableModelDescribe)
@@ -91,7 +72,7 @@ func (c *Client) AutoMigrateBatch(req *client.AutoMigrateBatchRequest) error {
 		})
 	}
 
-	_, err := c.commandServiceClient.AutoMigrateBatch(context.Background(), &request.AutoMigrateBatchRequest{
+	_, err := c.commandServiceClient.AutoMigrate(context.Background(), &request.AutoMigrateRequest{
 		DatabaseID: c.databaseID,
 		Items:      items,
 	})

+ 31 - 39
pb/v1/command.pb.go

@@ -31,17 +31,12 @@ var file_v1_command_proto_rawDesc = []byte{
 	0x1a, 0x19, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x63, 0x6f,
 	0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f,
 	0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70,
-	0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xc2, 0x05, 0x0a, 0x0e, 0x43, 0x6f, 0x6d,
+	0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xf2, 0x04, 0x0a, 0x0e, 0x43, 0x6f, 0x6d,
 	0x6d, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x41,
 	0x75, 0x74, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x71,
 	0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
 	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
 	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
-	0x00, 0x12, 0x4e, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
-	0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
-	0x41, 0x75, 0x74, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
-	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
 	0x00, 0x12, 0x56, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
 	0x12, 0x1d, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73,
 	0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a,
@@ -82,41 +77,38 @@ var file_v1_command_proto_rawDesc = []byte{
 
 var file_v1_command_proto_goTypes = []interface{}{
 	(*request.AutoMigrateRequest)(nil),        // 0: request.AutoMigrateRequest
-	(*request.AutoMigrateBatchRequest)(nil),   // 1: request.AutoMigrateBatchRequest
-	(*request.TransactionOperation)(nil),      // 2: request.TransactionOperation
-	(*request.InsertRequest)(nil),             // 3: request.InsertRequest
-	(*request.InsertBatchRequest)(nil),        // 4: request.InsertBatchRequest
-	(*request.DeleteRequest)(nil),             // 5: request.DeleteRequest
-	(*request.DeleteBatchRequest)(nil),        // 6: request.DeleteBatchRequest
-	(*request.UpdateRequest)(nil),             // 7: request.UpdateRequest
-	(*request.ReplayRequest)(nil),             // 8: request.ReplayRequest
-	(*empty.Empty)(nil),                       // 9: google.protobuf.Empty
-	(*response.CommandStatementResponse)(nil), // 10: response.CommandStatementResponse
+	(*request.TransactionOperation)(nil),      // 1: request.TransactionOperation
+	(*request.InsertRequest)(nil),             // 2: request.InsertRequest
+	(*request.InsertBatchRequest)(nil),        // 3: request.InsertBatchRequest
+	(*request.DeleteRequest)(nil),             // 4: request.DeleteRequest
+	(*request.DeleteBatchRequest)(nil),        // 5: request.DeleteBatchRequest
+	(*request.UpdateRequest)(nil),             // 6: request.UpdateRequest
+	(*request.ReplayRequest)(nil),             // 7: request.ReplayRequest
+	(*empty.Empty)(nil),                       // 8: google.protobuf.Empty
+	(*response.CommandStatementResponse)(nil), // 9: response.CommandStatementResponse
 }
 var file_v1_command_proto_depIdxs = []int32{
-	0,  // 0: v1.CommandService.AutoMigrate:input_type -> request.AutoMigrateRequest
-	1,  // 1: v1.CommandService.AutoMigrateBatch:input_type -> request.AutoMigrateBatchRequest
-	2,  // 2: v1.CommandService.Transaction:input_type -> request.TransactionOperation
-	3,  // 3: v1.CommandService.Insert:input_type -> request.InsertRequest
-	4,  // 4: v1.CommandService.InsertBatch:input_type -> request.InsertBatchRequest
-	5,  // 5: v1.CommandService.Delete:input_type -> request.DeleteRequest
-	6,  // 6: v1.CommandService.DeleteBatch:input_type -> request.DeleteBatchRequest
-	7,  // 7: v1.CommandService.Update:input_type -> request.UpdateRequest
-	8,  // 8: v1.CommandService.Replay:input_type -> request.ReplayRequest
-	9,  // 9: v1.CommandService.AutoMigrate:output_type -> google.protobuf.Empty
-	9,  // 10: v1.CommandService.AutoMigrateBatch:output_type -> google.protobuf.Empty
-	10, // 11: v1.CommandService.Transaction:output_type -> response.CommandStatementResponse
-	10, // 12: v1.CommandService.Insert:output_type -> response.CommandStatementResponse
-	10, // 13: v1.CommandService.InsertBatch:output_type -> response.CommandStatementResponse
-	10, // 14: v1.CommandService.Delete:output_type -> response.CommandStatementResponse
-	10, // 15: v1.CommandService.DeleteBatch:output_type -> response.CommandStatementResponse
-	10, // 16: v1.CommandService.Update:output_type -> response.CommandStatementResponse
-	10, // 17: v1.CommandService.Replay:output_type -> response.CommandStatementResponse
-	9,  // [9:18] is the sub-list for method output_type
-	0,  // [0:9] is the sub-list for method input_type
-	0,  // [0:0] is the sub-list for extension type_name
-	0,  // [0:0] is the sub-list for extension extendee
-	0,  // [0:0] is the sub-list for field type_name
+	0, // 0: v1.CommandService.AutoMigrate:input_type -> request.AutoMigrateRequest
+	1, // 1: v1.CommandService.Transaction:input_type -> request.TransactionOperation
+	2, // 2: v1.CommandService.Insert:input_type -> request.InsertRequest
+	3, // 3: v1.CommandService.InsertBatch:input_type -> request.InsertBatchRequest
+	4, // 4: v1.CommandService.Delete:input_type -> request.DeleteRequest
+	5, // 5: v1.CommandService.DeleteBatch:input_type -> request.DeleteBatchRequest
+	6, // 6: v1.CommandService.Update:input_type -> request.UpdateRequest
+	7, // 7: v1.CommandService.Replay:input_type -> request.ReplayRequest
+	8, // 8: v1.CommandService.AutoMigrate:output_type -> google.protobuf.Empty
+	9, // 9: v1.CommandService.Transaction:output_type -> response.CommandStatementResponse
+	9, // 10: v1.CommandService.Insert:output_type -> response.CommandStatementResponse
+	9, // 11: v1.CommandService.InsertBatch:output_type -> response.CommandStatementResponse
+	9, // 12: v1.CommandService.Delete:output_type -> response.CommandStatementResponse
+	9, // 13: v1.CommandService.DeleteBatch:output_type -> response.CommandStatementResponse
+	9, // 14: v1.CommandService.Update:output_type -> response.CommandStatementResponse
+	9, // 15: v1.CommandService.Replay:output_type -> response.CommandStatementResponse
+	8, // [8:16] is the sub-list for method output_type
+	0, // [0:8] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
 }
 
 func init() { file_v1_command_proto_init() }

+ 0 - 36
pb/v1/command_grpc.pb.go

@@ -26,7 +26,6 @@ const _ = grpc.SupportPackageIsVersion7
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 type CommandServiceClient interface {
 	AutoMigrate(ctx context.Context, in *request.AutoMigrateRequest, opts ...grpc.CallOption) (*empty.Empty, error)
-	AutoMigrateBatch(ctx context.Context, in *request.AutoMigrateBatchRequest, opts ...grpc.CallOption) (*empty.Empty, error)
 	Transaction(ctx context.Context, opts ...grpc.CallOption) (CommandService_TransactionClient, error)
 	Insert(ctx context.Context, in *request.InsertRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error)
 	InsertBatch(ctx context.Context, in *request.InsertBatchRequest, opts ...grpc.CallOption) (*response.CommandStatementResponse, error)
@@ -53,15 +52,6 @@ func (c *commandServiceClient) AutoMigrate(ctx context.Context, in *request.Auto
 	return out, nil
 }
 
-func (c *commandServiceClient) AutoMigrateBatch(ctx context.Context, in *request.AutoMigrateBatchRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
-	out := new(empty.Empty)
-	err := c.cc.Invoke(ctx, "/v1.CommandService/AutoMigrateBatch", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
 func (c *commandServiceClient) Transaction(ctx context.Context, opts ...grpc.CallOption) (CommandService_TransactionClient, error) {
 	stream, err := c.cc.NewStream(ctx, &CommandService_ServiceDesc.Streams[0], "/v1.CommandService/Transaction", opts...)
 	if err != nil {
@@ -152,7 +142,6 @@ func (c *commandServiceClient) Replay(ctx context.Context, in *request.ReplayReq
 // for forward compatibility
 type CommandServiceServer interface {
 	AutoMigrate(context.Context, *request.AutoMigrateRequest) (*empty.Empty, error)
-	AutoMigrateBatch(context.Context, *request.AutoMigrateBatchRequest) (*empty.Empty, error)
 	Transaction(CommandService_TransactionServer) error
 	Insert(context.Context, *request.InsertRequest) (*response.CommandStatementResponse, error)
 	InsertBatch(context.Context, *request.InsertBatchRequest) (*response.CommandStatementResponse, error)
@@ -170,9 +159,6 @@ type UnimplementedCommandServiceServer struct {
 func (UnimplementedCommandServiceServer) AutoMigrate(context.Context, *request.AutoMigrateRequest) (*empty.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method AutoMigrate not implemented")
 }
-func (UnimplementedCommandServiceServer) AutoMigrateBatch(context.Context, *request.AutoMigrateBatchRequest) (*empty.Empty, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method AutoMigrateBatch not implemented")
-}
 func (UnimplementedCommandServiceServer) Transaction(CommandService_TransactionServer) error {
 	return status.Errorf(codes.Unimplemented, "method Transaction not implemented")
 }
@@ -225,24 +211,6 @@ func _CommandService_AutoMigrate_Handler(srv interface{}, ctx context.Context, d
 	return interceptor(ctx, in, info, handler)
 }
 
-func _CommandService_AutoMigrateBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(request.AutoMigrateBatchRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(CommandServiceServer).AutoMigrateBatch(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/v1.CommandService/AutoMigrateBatch",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(CommandServiceServer).AutoMigrateBatch(ctx, req.(*request.AutoMigrateBatchRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
 func _CommandService_Transaction_Handler(srv interface{}, stream grpc.ServerStream) error {
 	return srv.(CommandServiceServer).Transaction(&commandServiceTransactionServer{stream})
 }
@@ -388,10 +356,6 @@ var CommandService_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "AutoMigrate",
 			Handler:    _CommandService_AutoMigrate_Handler,
 		},
-		{
-			MethodName: "AutoMigrateBatch",
-			Handler:    _CommandService_AutoMigrateBatch_Handler,
-		},
 		{
 			MethodName: "Insert",
 			Handler:    _CommandService_Insert_Handler,

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 181 - 382
pb/v1/request/command.pb.go


+ 0 - 15
pb/v1/request/command.validator.pb.go

@@ -17,21 +17,6 @@ var _ = fmt.Errorf
 var _ = math.Inf
 
 func (this *AutoMigrateRequest) Validate() error {
-	if this.DatabaseID == "" {
-		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
-	}
-	if this.TablePrefixWithSchema == "" {
-		return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
-	}
-	if this.Version == "" {
-		return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
-	}
-	if !(len(this.TableModelDescribe) > 0) {
-		return github_com_mwitkow_go_proto_validators.FieldError("TableModelDescribe", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.TableModelDescribe))
-	}
-	return nil
-}
-func (this *AutoMigrateBatchRequest) Validate() error {
 	if this.DatabaseID == "" {
 		return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
 	}

+ 0 - 9
test/v1/sdk.go

@@ -45,15 +45,6 @@ func (toolKit *ToolKit) autoMigrate(req *client.AutoMigrateRequest) *ToolKit {
 	return toolKit
 }
 
-func (toolKit *ToolKit) autoMigrateBatch(req *client.AutoMigrateBatchRequest) *ToolKit {
-	err := clientInstance.AutoMigrateBatch(req)
-	if err != nil {
-		toolKit.t.Fatal(err)
-	}
-
-	return toolKit
-}
-
 func (toolKit *ToolKit) transaction(txFunc client.TransactionFunc) *ToolKit {
 	err := clientInstance.Transaction(txFunc)
 	if err != nil {

+ 54 - 49
test/v1/v1_test.go

@@ -21,24 +21,12 @@ func TestAutoMigrate(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: "test." + simpleUUID()[0:8],
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
-			},
-		}).
-		autoMigrateBatch(&client.AutoMigrateBatchRequest{
 			Items: []client.AutoMigrateItem{
 				{
 					TablePrefixWithSchema: "test." + simpleUUID()[0:8],
 					Version:               "v1",
 					TableModelDescribe:    tableModelDescribe,
 				},
-				{
-					TablePrefixWithSchema: "test." + simpleUUID()[0:8],
-					Version:               "v1",
-					TableModelDescribe:    tableModelDescribe,
-				},
 			},
 		})
 }
@@ -62,10 +50,12 @@ func TestTransaction(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: tablePrefix,
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
+			Items: []client.AutoMigrateItem{
+				{
+					TablePrefixWithSchema: tablePrefix,
+					Version:               "v1",
+					TableModelDescribe:    tableModelDescribe,
+				},
 			},
 		}).
 		transaction(func(tx client.Transaction) error {
@@ -207,10 +197,12 @@ func TestTransactionBatch(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: tablePrefix,
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
+			Items: []client.AutoMigrateItem{
+				{
+					TablePrefixWithSchema: tablePrefix,
+					Version:               "v1",
+					TableModelDescribe:    tableModelDescribe,
+				},
 			},
 		}).
 		transaction(func(tx client.Transaction) error {
@@ -334,10 +326,12 @@ func TestInsert(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: tablePrefix,
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
+			Items: []client.AutoMigrateItem{
+				{
+					TablePrefixWithSchema: tablePrefix,
+					Version:               "v1",
+					TableModelDescribe:    tableModelDescribe,
+				},
 			},
 		}).
 		insert(&client.InsertRequest{
@@ -384,10 +378,12 @@ func TestInsertBatch(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: tablePrefix,
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
+			Items: []client.AutoMigrateItem{
+				{
+					TablePrefixWithSchema: tablePrefix,
+					Version:               "v1",
+					TableModelDescribe:    tableModelDescribe,
+				},
 			},
 		}).
 		insertBatch(&client.InsertBatchRequest{
@@ -467,10 +463,12 @@ func TestUpdate(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: tablePrefix,
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
+			Items: []client.AutoMigrateItem{
+				{
+					TablePrefixWithSchema: tablePrefix,
+					Version:               "v1",
+					TableModelDescribe:    tableModelDescribe,
+				},
 			},
 		}).
 		insert(&client.InsertRequest{
@@ -523,10 +521,12 @@ func TestDelete(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: tablePrefix,
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
+			Items: []client.AutoMigrateItem{
+				{
+					TablePrefixWithSchema: tablePrefix,
+					Version:               "v1",
+					TableModelDescribe:    tableModelDescribe,
+				},
 			},
 		}).
 		insert(&client.InsertRequest{
@@ -577,10 +577,12 @@ func TestDeleteBatch(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: tablePrefix,
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
+			Items: []client.AutoMigrateItem{
+				{
+					TablePrefixWithSchema: tablePrefix,
+					Version:               "v1",
+					TableModelDescribe:    tableModelDescribe,
+				},
 			},
 		}).
 		insertBatch(&client.InsertBatchRequest{
@@ -647,10 +649,12 @@ func TestReply(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: tablePrefix,
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
+			Items: []client.AutoMigrateItem{
+				{
+					TablePrefixWithSchema: tablePrefix,
+					Version:               "v1",
+					TableModelDescribe:    tableModelDescribe,
+				},
 			},
 		}).
 		insert(&client.InsertRequest{
@@ -701,11 +705,12 @@ func TestEventQuery(t *testing.T) {
 
 	newToolKit(t).
 		autoMigrate(&client.AutoMigrateRequest{
-
-			AutoMigrateItem: client.AutoMigrateItem{
-				TablePrefixWithSchema: tablePrefix,
-				Version:               "v1",
-				TableModelDescribe:    tableModelDescribe,
+			Items: []client.AutoMigrateItem{
+				{
+					TablePrefixWithSchema: tablePrefix,
+					Version:               "v1",
+					TableModelDescribe:    tableModelDescribe,
+				},
 			},
 		}).
 		insert(&client.InsertRequest{

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov