@@ -14,20 +14,48 @@ composer require fuzzyma/contao-database-commands-bundle
14
14
15
15
### Step 2: Register the bundle
16
16
17
- Open your AppBundle .php and add the following line in the dev/test section:
17
+ Open your AppKernel .php and add the following line in the dev/test section:
18
18
19
19
``` php
20
20
$bundles[] = new Fuzzyma\Contao\DatabaseCommandsBundle\ContaoDatabaseCommandsBundle();
21
21
```
22
22
23
+ or use the composer plugin to register bundles: [ ComposerRegisterBundlePlugin] ( https://github.com/Fuzzyma/composer-register-bundle-plugin )
24
+
23
25
## Usage
24
26
25
- ``` bash
26
- app/console contao:database:update --help // prints help messages
27
- app/console contao:database:update -d // updates the database INCLUDING [d]rops
28
- app/console contao:database:addAdmin // interactive
27
+ The following commands are available:
28
+
29
+ - contao:database: update | Updates the database to the current dca state
30
+ - contao:database: addAdmin | Adds a new admin user
31
+ - contao: license | Accepts the license
32
+ - contao: setup | Creates Database and runs all other commands to perform a full contao setup
33
+
34
+ ### contao:database: update
35
+
36
+ ```
37
+ app/console contao:database:update -d // updates the database INCLUDING [d]rops
38
+ app/console contao:database:update --dry-run // only prints queries. database is left untouched
39
+ ```
40
+
41
+ ### contao:database: addAdmin
42
+
43
+ ```
44
+ app/console contao:database:addAdmin // creates a new admin user interactively
29
45
app/console contao:database:addAdmin -u username -a name -m mail -p password // for the pros
30
- app/console contao:license // accept the license
46
+ app/console contao:database:addAdmin --force // will add admin even if admin user already present in tl_user table
47
+ ```
48
+
49
+ ### contao: license
50
+
51
+ ```
52
+ app/console contao:license // accept the license interactively
53
+ app/console contao:license --yes // accept the license directly
54
+ ```
55
+
56
+ ### contao: setup
57
+
58
+ ```
31
59
app/console contao:setup // do all together + creates database if not exists
32
60
```
33
61
0 commit comments