OroCRM Installer Commands: Part 1

As mentioned earlier, Oro's app/console oro:install command actually runs several smaller app/console commands. Over the next few days I'm going to give a brief overview of what each installer step does.

Caveat: This is for beta 6, and my understanding of Oro's systems is still in beta itself.

oro:entity-extend:clear

The oro:entity-extend:clear command clears the extended entity cache. An extended entity is OroBAP's answer to Magento's EAV system — it's the system that will enabled UI manageable attributes for Doctrine's entity objects. Part of how this system works is an Oro entity class like OroCRM\Bundle\AccountBundle\Entity\Account

namespace OroCRM\Bundle\AccountBundle\Entity;
//...
class Account extends ExtendAccount implements Taggable
{
    //...
}

extends an ExtendedAccount class. This ExtendedAccount class contains the methods/properties for the flexible entity attributes, and is generated in a cache folder.

You can view these extended entity classes in the following folders (mind the dev/prod enviornment folders)

app/cache/dev/oro_entities/Extend/Entity/
app/cache/prod/oro_entities/Extend/Entity/

The OroCRM installer clears these entities to make sure the new entity classes are generated, and that the old classes don't interfere with a fresh install.

doctrine:schema:drop --force --full-database

The doctrine:schema:drop command is a Symfony standard command, and completely drops your database. This ensures all the tables are removed from the database before reinstalling.

Important: The beta 6 installer uses the --full-database flag. This means the command will drop every table in the database, even if it has nothing to do with OroCRM. I'd expect this to change before the 1.0 ships.

doctrine:schema:create

The doctrine:schema:create command is, again, is a standard Symfony command. It's used to create OroCRM's database tables. This command scans the configured entity information in all the project's Symfony bundles, and creates the needed database tables.

That's it for now (this IS a quickies site), next time we'll cover some of the oro entity specific commands, starting with oro:entity-config:init.