Skip to content

Commit

Permalink
[DoctrineBundle] harmonized commands documentation by changing ./app/…
Browse files Browse the repository at this point in the history
…console to php app/console.
  • Loading branch information
Hugo Hamon committed Jul 28, 2011
1 parent 1c082b8 commit ec9c0aa
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 41 deletions.
Expand Up @@ -34,12 +34,12 @@ protected function configure()
The <info>doctrine:database:create</info> command creates the default
connections database:
<info>./app/console doctrine:database:create</info>
<info>php app/console doctrine:database:create</info>
You can also optionally specify the name of a connection to create the
database for:
<info>./app/console doctrine:database:create --connection=default</info>
<info>php app/console doctrine:database:create --connection=default</info>
EOT
);
}
Expand Down
Expand Up @@ -34,14 +34,14 @@ protected function configure()
The <info>doctrine:database:drop</info> command drops the default connections
database:
<info>./app/console doctrine:database:drop</info>
<info>php app/console doctrine:database:drop</info>
The --force parameter has to be used to actually drop the database.
You can also optionally specify the name of a connection to drop the database
for:
<info>./app/console doctrine:database:drop --connection=default</info>
<info>php app/console doctrine:database:drop --connection=default</info>
<error>Be careful: All data in a given database will be lost when executing
this command.</error>
Expand Down
Expand Up @@ -43,27 +43,27 @@ protected function configure()
* To a bundle:
<info>./app/console doctrine:generate:entities MyCustomBundle</info>
<info>php app/console doctrine:generate:entities MyCustomBundle</info>
* To a single entity:
<info>./app/console doctrine:generate:entities MyCustomBundle:User</info>
<info>./app/console doctrine:generate:entities MyCustomBundle/Entity/User</info>
<info>php app/console doctrine:generate:entities MyCustomBundle:User</info>
<info>php app/console doctrine:generate:entities MyCustomBundle/Entity/User</info>
* To a namespace
<info>./app/console doctrine:generate:entities MyCustomBundle/Entity</info>
<info>php app/console doctrine:generate:entities MyCustomBundle/Entity</info>
If the entities are not stored in a bundle, and if the classes do not exist,
the command has no way to guess where they should be generated. In this case,
you must provide the <comment>--path</comment> option:
<info>./app/console doctrine:generate:entities Blog/Entity --path=src/</info>
<info>php app/console doctrine:generate:entities Blog/Entity --path=src/</info>
You should provide the <comment>--no-backup</comment> option if you don't mind to back up files
before to generate entities:
<info>./app/console doctrine:generate:entities Blog/Entity --no-backup</info>
<info>php app/console doctrine:generate:entities Blog/Entity --no-backup</info>
<error>Important:</error> Even if you specified Inheritance options in your
XML or YAML Mapping files the generator cannot generate the base and
Expand Down
Expand Up @@ -42,22 +42,22 @@ protected function configure()
The <info>doctrine:mapping:import</info> command imports mapping information
from an existing database:
<info>./app/console doctrine:mapping:import "MyCustomBundle" xml</info>
<info>php app/console doctrine:mapping:import "MyCustomBundle" xml</info>
You can also optionally specify which entity manager to import from with the
<info>--em</info> option:
<info>./app/console doctrine:mapping:import "MyCustomBundle" xml --em=default</info>
<info>php app/console doctrine:mapping:import "MyCustomBundle" xml --em=default</info>
If you don't want to map every entity that can be found in the database, use the
<info>--filter</info> option. It will try to match the targeted mapped entity with the
provided pattern string.
<info>./app/console doctrine:mapping:import "MyCustomBundle" xml --filter=MyMatchedEntity</info>
<info>php app/console doctrine:mapping:import "MyCustomBundle" xml --filter=MyMatchedEntity</info>
Use the <info>--force</info> option, if you want to override existing mapping files:
<info>./app/console doctrine:mapping:import "MyCustomBundle" xml --force</info>
<info>php app/console doctrine:mapping:import "MyCustomBundle" xml --force</info>
EOT
);
}
Expand Down
Expand Up @@ -34,12 +34,12 @@ protected function configure()
entities exist and possibly if their mapping information contains errors or
not.
<info>./app/console doctrine:mapping:info</info>
<info>php app/console doctrine:mapping:info</info>
If you are using multiple entity managers you can pick your choice with the
<info>--em</info> option:
<info>./app/console doctrine:mapping:info --em=default</info>
<info>php app/console doctrine:mapping:info --em=default</info>
EOT
);
}
Expand Down
Expand Up @@ -36,12 +36,12 @@ protected function configure()
The <info>doctrine:cache:clear-metadata</info> command clears all metadata
cache for the default entity manager:
<info>./app/console doctrine:cache:clear-metadata</info>
<info>php app/console doctrine:cache:clear-metadata</info>
You can also optionally specify the <comment>--em</comment> option to specify
which entity manager to clear the cache for:
<info>./app/console doctrine:cache:clear-metadata --em=default</info>
<info>php app/console doctrine:cache:clear-metadata --em=default</info>
EOT
);
}
Expand Down
Expand Up @@ -36,12 +36,12 @@ protected function configure()
The <info>doctrine:cache:clear-query</info> command clears all query cache for
the default entity manager:
<info>./app/console doctrine:cache:clear-query</info>
<info>php app/console doctrine:cache:clear-query</info>
You can also optionally specify the <comment>--em</comment> option to specify
which entity manager to clear the cache for:
<info>./app/console doctrine:cache:clear-query --em=default</info>
<info>php app/console doctrine:cache:clear-query --em=default</info>
EOT
);
}
Expand Down
Expand Up @@ -36,27 +36,27 @@ protected function configure()
The <info>doctrine:cache:clear-result</info> command clears all result cache
for the default entity manager:
<info>./app/console doctrine:cache:clear-result</info>
<info>php app/console doctrine:cache:clear-result</info>
You can also optionally specify the <comment>--em</comment> option to specify
which entity manager to clear the cache for:
<info>./app/console doctrine:cache:clear-result --em=default</info>
<info>php app/console doctrine:cache:clear-result --em=default</info>
If you don't want to clear all result cache you can specify some additional
options to control what cache is deleted:
<info>./app/console doctrine:cache:clear-result --id=cache_key</info>
<info>php app/console doctrine:cache:clear-result --id=cache_key</info>
Or you can specify a <comment>--regex</comment> to delete cache entries that
match it:
<info>./app/console doctrine:cache:clear-result --regex="user_(.*)"</info>
<info>php app/console doctrine:cache:clear-result --regex="user_(.*)"</info>
You can also specify a <comment>--prefix</comment> or
<comment>--suffix</comment> to delete cache entries for:
<info>./app/console doctrine:cache:clear-result --prefix="user_" --suffix="_frontend"</info>
<info>php app/console doctrine:cache:clear-result --prefix="user_" --suffix="_frontend"</info>
EOT
);
}
Expand Down
Expand Up @@ -39,7 +39,7 @@ protected function configure()
The <info>doctrine:mapping:convert</info> command converts mapping information
between supported formats:
<info>./app/console doctrine:mapping:convert xml /path/to/output</info>
<info>php app/console doctrine:mapping:convert xml /path/to/output</info>
EOT
);
}
Expand Down
Expand Up @@ -39,15 +39,15 @@ protected function configure()
The <info>doctrine:schema:create</info> command executes the SQL needed to
generate the database schema for the default entity manager:
<info>./app/console doctrine:schema:create</info>
<info>php app/console doctrine:schema:create</info>
You can also generate the database schema for a specific entity manager:
<info>./app/console doctrine:schema:create --em=default</info>
<info>php app/console doctrine:schema:create --em=default</info>
Finally, instead of executing the SQL, you can output the SQL:
<info>./app/console doctrine:schema:create --dump-sql</info>
<info>php app/console doctrine:schema:create --dump-sql</info>
EOT
);
}
Expand Down
Expand Up @@ -38,16 +38,16 @@ protected function configure()
The <info>doctrine:schema:drop</info> command generates the SQL needed to
drop the database schema of the default entity manager:
<info>./app/console doctrine:schema:drop --dump-sql</info>
<info>php app/console doctrine:schema:drop --dump-sql</info>
Alternatively, you can execute the generated queries:
<info>./app/console doctrine:schema:drop --force</info>
<info>php app/console doctrine:schema:drop --force</info>
You can also optionally specify the name of a entity manager to drop the
schema for:
<info>./app/console doctrine:schema:drop --em=default</info>
<info>php app/console doctrine:schema:drop --em=default</info>
EOT
);
}
Expand Down
Expand Up @@ -37,12 +37,12 @@ protected function configure()
The <info>doctrine:ensure-production-settings</info> command ensures that
Doctrine is properly configured for a production environment.:
<info>./app/console doctrine:ensure-production-settings</info>
<info>php app/console doctrine:ensure-production-settings</info>
You can also optionally specify the <comment>--em</comment> option to specify
which entity manager to use:
<info>./app/console doctrine:ensure-production-settings --em=default</info>
<info>php app/console doctrine:ensure-production-settings --em=default</info>
EOT
);
}
Expand Down
Expand Up @@ -37,17 +37,17 @@ protected function configure()
The <info>doctrine:query:dql</info> command executes the given DQL query and
outputs the results:
<info>./app/console doctrine:query:dql "SELECT u FROM UserBundle:User u"</info>
<info>php app/console doctrine:query:dql "SELECT u FROM UserBundle:User u"</info>
You can also optional specify some additional options like what type of
hydration to use when executing the query:
<info>./app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --hydrate=array</info>
<info>php app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --hydrate=array</info>
Additionally you can specify the first result and maximum amount of results to
show:
<info>./app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --first-result=0 --max-result=30</info>
<info>php app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --first-result=0 --max-result=30</info>
EOT
);
}
Expand Down
Expand Up @@ -37,7 +37,7 @@ protected function configure()
The <info>doctrine:query:sql</info> command executes the given DQL query and
outputs the results:
<info>./app/console doctrine:query:sql "SELECT * from user"</info>
<info>php app/console doctrine:query:sql "SELECT * from user"</info>
EOT
);
}
Expand Down
Expand Up @@ -43,15 +43,15 @@ protected function configure()
For example, if you add metadata for a new column to an entity, this command
would generate and output the SQL needed to add the new column to the database:
<info>./app/console doctrine:schema:update --dump-sql</info>
<info>php app/console doctrine:schema:update --dump-sql</info>
Alternatively, you can execute the generated queries:
<info>./app/console doctrine:schema:update --force</info>
<info>php app/console doctrine:schema:update --force</info>
You can also update the database schema for a specific entity manager:
<info>./app/console doctrine:schema:update --em=default</info>
<info>php app/console doctrine:schema:update --em=default</info>
EOT
);
}
Expand Down

0 comments on commit ec9c0aa

Please sign in to comment.