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
.env
file so that the lineDATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db
is uncommented and the other lines starting withDATABASE_URL
are commented out. rm var/data.db
(might not exist)rm src/Migrations/*
(might be empty)php bin/console -n make:migration
php bin/console -n doctrine:migrations:migrate
- Optional: When you run the
check_fixity
command 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
create
privileges - Edit the
.env
file so that this line contains the user, password, and database name you want:DATABASE_URL=mysql://user:[email protected]:3306/riprap
and 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:[email protected]:3306/riprap
. rm src/Migrations/*
(might be empty)php bin/console doctrine:database:create
php bin/console -n make:migration
php bin/console -n doctrine:migrations:migrate
- Optional: When you run the
check_fixity
command 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
.env
file so that this line contains the user, password, and database name you want:DATABASE_URL=pgsql://user:[email protected]:5432/riprap
and 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:[email protected]:5432/riprap
. rm src/Migrations/*
(might be empty)php bin/console doctrine:database:create
php bin/console -n make:migration
php bin/console -n doctrine:migrations:migrate
- Optional: When you run the
check_fixity
command 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