Skip to content

Commit a846aa4

Browse files
authored
Merge pull request #3327 from spryker/profuel-patch-2
Reused existing guide for the console command
2 parents f0e0a31 + fc6dfdc commit a846aa4

File tree

1 file changed

+4
-33
lines changed

1 file changed

+4
-33
lines changed

docs/dg/dev/backend-development/data-manipulation/data-ingestion/structural-preparations/adding-uuid-to-db-model.md

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ composer require spryker/uuid-behavior
2222
<behavior name="uuid">
2323
<parameter
2424
name="key_columns"
25-
value="<column list, dot-separated, e.g. id_table_name.some_column.>"
25+
value="<column list, dot-separated, e.g. id_table_name.some_column.another_column>"
2626
/>
2727
</behavior>
2828
```
@@ -47,37 +47,8 @@ console propel:install
4747
4. Verify that the `uuid` column is present in the database table.
4848
Insert a new entity to confirm that UUIDs are generated automatically.
4949

50-
## For tables with existing data
50+
{% info_block infoBox "For tables with existing data" %}
5151

52-
5. Require the composer dependency:
52+
If you are adding the column `uuid` into existing table, follow [this guide](/docs/pbc/all/cart-and-checkout/latest/base-shop/install-and-upgrade/install-features/install-the-uuid-generation-console-feature#set-up-console-command) to fill daata into existing columns.
5353

54-
```shell
55-
composer require spryker/uuid
56-
```
57-
58-
6. Add `\Spryker\Zed\Uuid\Communication\Console\UuidGeneratorConsole` to `\Pyz\Zed\Console\ConsoleDependencyProvider::getConsoleCommands`:
59-
60-
```php
61-
namespace Pyz\Zed\Console;
62-
63-
...
64-
use Spryker\Zed\Uuid\Communication\Console\UuidGeneratorConsole;
65-
...
66-
67-
class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider
68-
69-
...
70-
protected function getConsoleCommands(Container $container): array
71-
...
72-
new UuidGeneratorConsole(),
73-
...
74-
75-
```
76-
77-
7. Execute the `uuid:generate` console command for each affected table:
78-
79-
```shell
80-
console uuid:generate <module> <table-name>
81-
```
82-
83-
8. Verify that all `uuid` values in the table `<table-name>` are filled with values.
54+
{% endinfo_block %}

0 commit comments

Comments
 (0)