You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/book/v6/installation/doctrine-orm.md
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,31 @@
2
2
3
3
## Setup database
4
4
5
-
Make sure you fill out the database credentials in `config/autoload/local.php` under `$databases['default']`.
5
+
Use an existing empty one or create a new **MariaDB**/**MySQL** database.
6
6
7
-
Create a new MySQL database - set collation to `utf8mb4_general_ci`
7
+
> Recommended collation: `utf8mb4_general_ci`.
8
8
9
-
## Running migrations
9
+
With a database created, fill out the database connection params in `config/autoload/local.php` under `$databases['default']`.
10
10
11
-
Run the database migrations by using the following command:
11
+
#### Creating migrations
12
+
13
+
Create a new migration by running:
14
+
15
+
```shell
16
+
php ./vendor/bin/doctrine-migrations diff
17
+
```
18
+
19
+
The new migration file will be placed in `src/Core/src/App/src/Migration/`.
20
+
21
+
#### Running migrations
22
+
23
+
Execute a new migration by running:
12
24
13
25
```shell
14
-
php vendor/bin/doctrine-migrations migrate
26
+
php ./vendor/bin/doctrine-migrations migrate
15
27
```
16
28
17
-
This command will prompt you to confirm that you want to run it.
29
+
This command will prompt you to confirm that you want to run it:
18
30
19
31
> WARNING! You are about to execute a migration in database "..." that could result in schema changes and data loss. Are you sure you wish to continue? (yes/no) [yes]:
20
32
@@ -27,21 +39,21 @@ Hit `Enter` to confirm the operation.
27
39
To list all the fixtures, run:
28
40
29
41
```shell
30
-
php bin/doctrine fixtures:list
42
+
php ./bin/doctrine fixtures:list
31
43
```
32
44
33
45
This will output all the fixtures in the order of execution.
0 commit comments