1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-22 01:11:34 +02:00

Merge pull request #6322 from turbo124/v5-develop

Change default row_format from compressed to dynamic
This commit is contained in:
David Bomba 2021-07-24 11:05:22 +10:00 committed by GitHub
commit 59549e02e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 10 deletions

View File

@ -34,7 +34,7 @@ class StoreCompanyGatewayRequest extends Request
public function rules()
{
$rules = [
'gateway_key' => 'required',
'gateway_key' => 'required|alpha_num',
'fees_and_limits' => new ValidCompanyGatewayFeesAndLimitsRule(),
];
@ -45,9 +45,8 @@ class StoreCompanyGatewayRequest extends Request
{
$input = $this->all();
$gateway = Gateway::where('key', $input['gateway_key'])->first();
if($gateway);
if($gateway = Gateway::where('key', $input['gateway_key'])->first())
{
$default_gateway_fields = json_decode($gateway->fields);

View File

@ -112,6 +112,10 @@ class NinjaMailerJob implements ShouldQueue
} catch (\Exception $e) {
// if($e instanceof GuzzleHttp\Exception\ClientException){
// }
nlog("error failed with {$e->getMessage()}");
if($this->nmo->entity)

View File

@ -107,7 +107,10 @@ class TemplateEmail extends Mailable
$message->invitation = $this->invitation;
});
//hosted | plan check here
/*TODO insert another check here for whether the attachment exists */
nlog($this->build_email->getAttachments());
foreach ($this->build_email->getAttachments() as $file) {
if(is_string($file))

View File

@ -46,7 +46,7 @@ return [
'prefix' => '',
'prefix_indexes' => true,
'strict' => env('DB_STRICT', false),
// 'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
// 'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
],
'sqlite' => [
@ -93,7 +93,7 @@ return [
'prefix' => '',
'prefix_indexes' => true,
'strict' => env('DB_STRICT', false),
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
// 'options' => array(
// PDO::ATTR_EMULATE_PREPARES => true
// ),
@ -111,7 +111,7 @@ return [
'prefix' => '',
'prefix_indexes' => true,
'strict' => env('DB_STRICT', false),
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
// 'options' => array(
// PDO::ATTR_EMULATE_PREPARES => true
// ),
@ -129,7 +129,7 @@ return [
'prefix' => '',
'prefix_indexes' => true,
'strict' => env('DB_STRICT', false),
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
// 'options' => array(
// PDO::ATTR_EMULATE_PREPARES => true
// ),
@ -147,7 +147,7 @@ return [
'prefix' => '',
'prefix_indexes' => true,
'strict' => env('DB_STRICT', false),
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
// 'options' => array(
// PDO::ATTR_EMULATE_PREPARES => true
// ),

View File

@ -45,6 +45,43 @@ class CompanyGatewayApiTest extends TestCase
Model::reguard();
}
public function testCompanyGatewayEndPointsWithIncorrectFields()
{
$data = [
'config' => 'random config',
'gateway_key' => '',
];
/* POST */
$response = $this->withHeaders([
'X-API-SECRET' => config('ninja.api_secret'),
'X-API-TOKEN' => $this->token,
])->post('/api/v1/company_gateways', $data);
$response->assertStatus(302);
}
public function testCompanyGatewayEndPointsWithInvalidFields()
{
$data = [
'config' => 'random config',
'gateway_key' => '$#%^&*(',
];
/* POST */
$response = $this->withHeaders([
'X-API-SECRET' => config('ninja.api_secret'),
'X-API-TOKEN' => $this->token,
])->post('/api/v1/company_gateways', $data);
$response->assertStatus(302);
}
public function testCompanyGatewayEndPoints()
{
$data = [