Skip to content

Commit 55be6f6

Browse files
authored
Merge pull request #15 from steinkel/fix/mariadb-indexes-and-default-config
add default app local, fix signed issue with migrations
2 parents e7f5252 + 34b93e6 commit 55be6f6

3 files changed

Lines changed: 102 additions & 2 deletions

File tree

config/Migrations/20221126022125_InitialSchema.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function up()
1919
'default' => null,
2020
'limit' => null,
2121
'null' => false,
22+
'signed' => false,
2223
])
2324
->addColumn('title', 'string', [
2425
'default' => null,
@@ -68,11 +69,13 @@ public function up()
6869
'default' => null,
6970
'limit' => null,
7071
'null' => false,
72+
'signed' => false,
7173
])
7274
->addColumn('tag_id', 'integer', [
7375
'default' => null,
7476
'limit' => null,
7577
'null' => false,
78+
'signed' => false,
7679
])
7780
->addIndex(
7881
[

config/app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,15 +339,15 @@
339339
'path' => LOGS,
340340
'file' => 'debug',
341341
'url' => env('LOG_DEBUG_URL', null),
342-
'scopes' => false,
342+
'scopes' => null,
343343
'levels' => ['notice', 'info', 'debug'],
344344
],
345345
'error' => [
346346
'className' => FileLog::class,
347347
'path' => LOGS,
348348
'file' => 'error',
349349
'url' => env('LOG_ERROR_URL', null),
350-
'scopes' => false,
350+
'scopes' => null,
351351
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
352352
],
353353
// To enable this dedicated query log, you need set your datasource's log flag to true

config/app_local.example.php

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?php
2+
3+
use function Cake\Core\env;
4+
5+
/*
6+
* Local configuration file to provide any overrides to your app.php configuration.
7+
* Copy and save this file as app_local.php and make changes as required.
8+
* Note: It is not recommended to commit files with credentials such as app_local.php
9+
* into source code version control.
10+
*/
11+
return [
12+
/*
13+
* Debug Level:
14+
*
15+
* Production Mode:
16+
* false: No error messages, errors, or warnings shown.
17+
*
18+
* Development Mode:
19+
* true: Errors and warnings shown.
20+
*/
21+
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
22+
23+
/*
24+
* Security and encryption configuration
25+
*
26+
* - salt - A random string used in security hashing methods.
27+
* The salt value is also used as the encryption key.
28+
* You should treat it as extremely sensitive data.
29+
*/
30+
'Security' => [
31+
'salt' => env('SECURITY_SALT', '__SALT__'),
32+
],
33+
34+
/*
35+
* Connection information used by the ORM to connect
36+
* to your application's datastores.
37+
*
38+
* See app.php for more configuration options.
39+
*/
40+
'Datasources' => [
41+
'default' => [
42+
'host' => 'localhost',
43+
/*
44+
* CakePHP will use the default DB port based on the driver selected
45+
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
46+
* the following line and set the port accordingly
47+
*/
48+
//'port' => 'non_standard_port_number',
49+
50+
'username' => 'my_app',
51+
'password' => 'secret',
52+
53+
'database' => 'my_app',
54+
/*
55+
* If not using the default 'public' schema with the PostgreSQL driver
56+
* set it here.
57+
*/
58+
//'schema' => 'myapp',
59+
60+
/*
61+
* You can use a DSN string to set the entire configuration
62+
*/
63+
'url' => env('DATABASE_URL', null),
64+
],
65+
66+
/*
67+
* The test connection is used during the test suite.
68+
*/
69+
'test' => [
70+
'host' => 'localhost',
71+
//'port' => 'non_standard_port_number',
72+
'username' => 'my_app',
73+
'password' => 'secret',
74+
'database' => 'test_myapp',
75+
//'schema' => 'myapp',
76+
'url' => env('DATABASE_TEST_URL', 'sqlite://127.0.0.1/tmp/tests.sqlite'),
77+
],
78+
],
79+
80+
/*
81+
* Email configuration.
82+
*
83+
* Host and credential configuration in case you are using SmtpTransport
84+
*
85+
* See app.php for more configuration options.
86+
*/
87+
'EmailTransport' => [
88+
'default' => [
89+
'host' => 'localhost',
90+
'port' => 25,
91+
'username' => null,
92+
'password' => null,
93+
'client' => null,
94+
'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
95+
],
96+
],
97+
];

0 commit comments

Comments
 (0)