A guide to using auditor-bundle.
doctrine-provider
The process of audit table creation differs depending on your current setup:
Open a command console, enter your project directory and execute the following command to review the new audit tables in the update schema queue.
# symfony < 3.4
app/console doctrine:schema:update --dump-sql
# symfony >= 3.4
bin/console doctrine:schema:update --dump-sql
# symfony < 3.4
app/console doctrine:migrations:diff
app/console doctrine:migrations:migrate
# symfony >= 3.4
bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate
# symfony < 3.4
app/console doctrine:schema:update --force
# symfony >= 3.4
bin/console doctrine:schema:update --force
Doctrine Schema-Tool
and DoctrineMigrationsBundle
are not able to work with more than one
database at once. To workaround that limitation, this bundle offers a migration command that
focuses on audit schema manipulation.
Open a command console, enter your project directory and execute the following command to review the new audit tables in the update schema queue.
# symfony < 3.4
app/console audit:schema:update --dump-sql
# symfony >= 3.4
bin/console audit:schema:update --dump-sql
Once you're done, execute the following command to apply.
# symfony < 3.4
app/console audit:schema:update --force
# symfony >= 3.4
bin/console audit:schema:update --force
doctrine-provider
After updating auditor
library of auditor-bundle
, the schema might need to be updated,
you can do so by using the audit:schema:update
command.
This ensures that:
Open a command console, enter your project directory and execute the following command to review the new audit tables in the update schema queue.
# symfony < 3.4
app/console audit:schema:update --dump-sql
# symfony >= 3.4
bin/console audit:schema:update --dump-sql
Once you're done, execute the following command to apply.
# symfony < 3.4
app/console audit:schema:update --force
# symfony >= 3.4
bin/console audit:schema:update --force