File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed
Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ is required.
2121If you want to use your own database, update the ` 'Datasources' ` configuration in ` config/app.php ` .
2222You'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
Original file line number Diff line number Diff 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 [
Original file line number Diff line number Diff line change 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.
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 /*
You can’t perform that action at this time.
0 commit comments