Switching Databases
Using a Different Database
Often you want to test development code on different datasets (e.g. a fresh Elentra install, or a copy of your staging/production data). You can have multiple datasets in your database at the same time, and switch between them.
Create a new Elentra ME auth database and import the new auth data into it.
Create a new Elentra ME database and import the new Elentra ME data into it.
Create a new Elentra ME clerkship database and import the new clerkship data into it.
In the
databasesection of the array inconfig.inc.php, set theentrada_database,auth_database, andclerkship_databasevalues to the names of the new databases.Ensure that the database user (defined in
config.inc.php) has select/update/create/delete access to all three of the above databases.Ensure that there is a user with suitable entries in the
[auth_schema].user_accesslinked to an organisation in the[auth_shema].organisationstableThis organisation should also have a corresponding entry in the
[auth_schema].registered_appstable.The ID of this entry should be configured as the
AUTH_APP_IDin thesettings.inc.phpfile.
Run migrations on the new dataset (in a terminal, go to the root of your installation and type:
php elentra migrate --up).If you are importing old user credentials on top of the new dataset, in order to login you must update the
[auth_schema].user_datatable. You can either import the entire old User row or copy the old fields (username,password,saltanduuid) into the new dataset.
Last updated