Elentra Platform Technical Documentation
  • Introduction
  • Reporting Issues
    • Security Notices
  • Administrators
    • Server Requirements
    • Application Server
      • Shibboleth Single Sign-on
      • Installing Supervisor
      • Branded API Setup
      • Installing Mailhog
    • Database Server
  • Developers
    • Getting Started
    • Overview
    • Contributions
      • Request for Change
      • Jira and GitHub Details
      • Coding Standards
      • Quickstart Guide
      • Code Review
    • Database
    • Dataviews for Analytics
    • Global Namespace
    • Elentra ACL
    • Authentication Methods
    • Compatibility Matrix
    • Elentra ME Versions
    • Elentra Settings
    • Elentra Deployment
    • Elentra API
    • Elentra JS
    • Feature Configuration
      • Event Resource Integration
      • Microsoft Teams Integration
    • Troubleshooting & Guides
      • New developer features in Elentra ME 1.22
      • Testing With Codeception
        • Unit Testing
          • Unit Testing Best Practises
          • Writing Unit Testable Code
          • PHPUnit Testing for API
          • PHPUnit Json String Compare Function
        • Functional Testing
          • Functional Testing Best Practices
        • Integration Testing
          • Integration Testing Best Practices
      • Upgrading elentra-developer Docker
      • VS Code Setup
      • Using XDebug in VSCode
      • Upgrading PHP
      • Switching Databases
      • Creating a new virtual host
      • Logging In
      • Composer
      • Curriculum Tag Selector
      • Performance Issues
      • Docker
      • Seed Data Generation
      • Fail Fast Programming
      • Advanced Custom Exception Classes
    • Support
  • Upgrade Guides
    • Upgrading to ME v28.0
    • Upgrading to ME 1.27
    • Upgrading to ME 1.26
    • Upgrading to ME 1.25
    • Upgrading to ME 1.24
    • Upgrading to ME 1.23
    • Upgrading to ME 1.22
    • Upgrading to ME 1.21
    • Upgrading to ME 1.20
    • Upgrading to ME 1.19
    • Upgrading to ME 1.18
    • Upgrading to ME 1.17
    • Upgrading to ME 1.16
    • Upgrading to ME 1.15
Powered by GitBook
On this page
  1. Developers
  2. Troubleshooting & Guides

Switching Databases

PreviousUpgrading PHPNextCreating a new virtual host

Last updated 4 years ago

Using a Different Database

Please see for troubleshooting steps if you are experiencing issues with logging into your development installation of Elentra.

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 database section of the array in config.inc.php, set the entrada_database,auth_database, and clerkship_database values 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_access linked to an organisation in the [auth_shema].organisations table

    • This organisation should also have a corresponding entry in the [auth_schema].registered_apps table.

    • The ID of this entry should be configured as the AUTH_APP_ID in the settings.inc.php file.

  • 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_data table. You can either import the entire old User row or copy the old fields (username, password, salt and uuid) into the new dataset.

It is not necessary to update the user_data table to use Elentra's "Login as" functionality, for all users, only the ones you will login as from the Elentra login page.

Login Checklist