These instructions assume you have the database engine installed installed and configured properly, with the appropriate PHP drivers.
Follow these instructions from within the riprap directory:
- Edit the
.envfile so that the lineDATABASE_URL=sqlite:///%kernel.project_dir%/var/data.dbis uncommented and the other lines starting withDATABASE_URLare commented out. rm var/data.db(might not exist)rm src/Migrations/*(might be empty)php bin/console -n make:migrationphp bin/console -n doctrine:migrations:migrate- Optional: When you run the
check_fixitycommand as described below, it will create events based on the fixity checks. If you want to populate the database with some sample fixity events prior to runningcheck_fixity(you don't need to), runphp bin/console -n doctrine:fixtures:load
In config/packages/doctrine.yaml, make sure you have:
doctrine:
dbal:
driver: 'pdo_mysql'
server_version: '5.7' # Or whatever version you are running.
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
Then follow these instructions from within the riprap directory:
- Create a MySQL user with
createprivileges - Edit the
.envfile so that this line contains the user, password, and database name you want:DATABASE_URL=mysql://user:password@127.0.0.1:3306/riprapand the other lines starting with DATABASE_URL are commented out. You can also use a remote database by specifying its hostname like this:DATABASE_URL=mysql://user:password@my.dbhost.org:3306/riprap. rm src/Migrations/*(might be empty)php bin/console doctrine:database:createphp bin/console -n make:migrationphp bin/console -n doctrine:migrations:migrate- Optional: When you run the
check_fixitycommand as described below, it will create events based on the fixity checks. If you want to populate the database with some sample fixity events prior to runningcheck_fixity(you don't need to), runphp bin/console -n doctrine:fixtures:load
In config/packages/doctrine.yaml, make sure you have:
doctrine:
dbal:
driver: 'pdo_pgsql'
charset: utf8
Then follow these instructions from within the riprap directory:
- Create a PostgreSQL user with 'createdb' privileges
- Edit the
.envfile so that this line contains the user, password, and database name you want:DATABASE_URL=pgsql://user:password@127.0.0.1:5432/riprapand the other lines starting with DATABASE_URL are commented out. You can also use a remote database by specifying its hostname like this:DATABASE_URL=pgsql://user:password@my.dbhost.org:5432/riprap. rm src/Migrations/*(might be empty)php bin/console doctrine:database:createphp bin/console -n make:migrationphp bin/console -n doctrine:migrations:migrate- Optional: When you run the
check_fixitycommand as described below, it will create events based on the fixity checks. If you want to populate the database with some sample fixity events prior to runningcheck_fixity(you don't need to), runphp bin/console -n doctrine:fixtures:load