Skip to content

Commit e3a0ccc

Browse files
authored
Merge branch 'master' into feature/update-cms-tutorial
2 parents ea9642f + c07ed79 commit e3a0ccc

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ is required.
2121
If you want to use your own database, update the `'Datasources'` configuration in `config/app.php`.
2222
You'll also need to create a database and run the SQL located in the tutorial.
2323

24+
* Update the `'Datasources'` configuration by:
25+
* editing `config/app.php` or `config/app_local.php` for your local database or
26+
* edit `config/bootstrap.php` to enable use of a `.env` file (uncomment the section that loads the `.env` file) (and provide the `config/.env` file.
27+
* Create a database if needed.
28+
* Run `bin/cake migrations migrate` to create the database tables.
29+
30+
2431
## Running the project
2532

2633
```bash

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_local.example.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
2+
3+
use function Cake\Core\env;
4+
25
/*
36
* Local configuration file to provide any overrides to your app.php configuration.
47
* Copy and save this file as app_local.php and make changes as required.
@@ -36,10 +39,28 @@
3639
*/
3740
'Datasources' => [
3841
'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+
3960
/*
4061
* You can use a DSN string to set the entire configuration
4162
*/
42-
'url' => env('DATABASE_URL', 'sqlite://127.0.0.1/database/cms-tutorial.sqlite'),
63+
'url' => env('DATABASE_URL', null),
4364
],
4465

4566
/*

0 commit comments

Comments
 (0)