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/dg/dev/backend-development/data-manipulation/data-ingestion/structural-preparations/adding-uuid-to-db-model.md
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>"
26
26
/>
27
27
</behavior>
28
28
```
@@ -47,37 +47,8 @@ console propel:install
47
47
4. Verify that the `uuid` column is present in the database table.
48
48
Insert a new entity to confirm that UUIDs are generated automatically.
49
49
50
-
## For tables with existing data
50
+
{% info_block infoBox "For tables with existing data" %}
51
51
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.
53
53
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.
0 commit comments