Ako pristupovať k Doctrine commandom v Nette CLI?

steelbull
Člen | 244
+
0
-

Keď zavolám php www/index.php, vidím list CLI commandov. Vidím tam commandy ORM. Ale dá sa napr. spustiť napr. make:entity, make:migration, migration:migrate ako v Symfony? Alebo je to vlastnosť Symfony a tým pádom to nie je prístupné v Doctrine v Nette?

Diq.

Nette Framework unknown

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --debug-mode[=DEBUG-MODE]  Run the application in debug mode?
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  help                               Displays help for a command
  list                               Lists commands
 dbal
  dbal:import                        Import SQL file(s) directly to Database.
  dbal:reserved-words                Checks if the current database contains identifiers that are reserved.
 kdyby
  kdyby:translation-extract          Extracts strings from application to translation files
 orm
  orm:clear-cache:metadata           Clear all metadata cache of the various cache drivers
  orm:clear-cache:query              Clear all query cache of the various cache drivers
  orm:clear-cache:region:collection  Clear a second-level cache collection region
  orm:clear-cache:region:entity      Clear a second-level cache entity region
  orm:clear-cache:region:query       Clear a second-level cache query region
  orm:clear-cache:result             Clear all result cache of the various cache drivers
  orm:convert-mapping                Convert mapping information between supported formats
  orm:generate-entities              Generate entity classes and method stubs from your mapping information
  orm:generate-proxies               Generates proxy classes for entity classes
  orm:info                           Show basic information about all mapped entities
  orm:mapping:describe               Display information about mapped objects
  orm:schema-tool:create             Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output
  orm:schema-tool:drop               Drop the complete database schema of EntityManager Storage Connection or generate the corresponding SQL output
  orm:schema-tool:update             Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata
  orm:validate-schema                Validate the mapping files

Editoval steelbull (13. 11. 2019 11:45)

MajklNajt
Člen | 513
+
+1
-

správa odpoveď je B – je to vlastnosť Symfony a tým pádom to nie je prístupné v Doctrine v Nette

steelbull
Člen | 244
+
0
-

Škoda, ale ďakujem za odpoveď.

Felix
Nette Core | 1260
+
+2
-
steelbull
Člen | 244
+
0
-

Ahoj @Felix, veeeelmi pekne dakujem za Tvoje odpovede, idem to vyskusat, doteraz som to stale odkladal, ale vyzera, ze orm sa uz nevyhnem a budem to musiet dorobit, preto mi Tvoja pomoc prisla aj veli vhod!

D-A-K-U-J-E-M

Felix napsal(a):

https://github.com/…ine-skeleton

steelbull
Člen | 244
+
0
-

@Felix skusal som, ale stale neviem, ako vygenrujem entities z DB (aspon prvy raz), ten command tam nie je (resp. aspon ja ho tam nemam)

Editoval steelbull (1. 5. 22:07)

Felix
Nette Core | 1260
+
0
-

@steelbull Co presne tam nemas? Muzes udelat repozitar kde mas ten problem a nasdilet mi ho?

steelbull
Člen | 244
+
0
-

@Felix Neviem nájsť command, resp. možno len neviem, ako nettrine použiť, aby som vygeneroval z existujúcej DB repozitáre a classy. Ak v existujúcej clase User urobím zmenu a spustím migrate, do DB sa zapíše, ale chcem nettrine integrovať do existujúceho projektu a potrebujem to opačne, vytvoriť spätne repozitáre a classy z DB. Neviem, či si dobre pamätám, v Symfony sa to volalo nejak „orm:convert-mapping“. Má nejaký podobný command aj Nettrine, ktorý by som mohol použiť?

Felix napsal(a):

@steelbull Co presne tam nemas? Muzes udelat repozitar kde mas ten problem a nasdilet mi ho?

Editoval steelbull (2. 5. 22:07)

Felix
Nette Core | 1260
+
0
-

Aha, uz rozumim. Tohle co popisujes je vec Symfony.

https://symfony.com/…octrine.html#…

Od Doctrine 3.x to jiz neni soucasti Doctrine, muzes se pripadne podivat na to jak to vypadalo v Doctrine 2.x.

https://github.com/…sCommand.php

Jeste posilam changelog: https://github.com/…x/UPGRADE.md#…