Skip to content

Update Database New

DeclanBuckley edited this page May 2, 2024 · 13 revisions

Home / Update / Client Code

How to update the Database to the Latest Release.

Link to the original Instructions for updating the Database: [Updating the Database]

(https://github.com/CSOIreland/PxStat/wiki/Update-Database).

N.B. Before doing any update, it is recommended that you take a full backup of your database.

Updating the Database is very straight forward.

  • Please supply a valid PxStat admin username. Your app config changes will be shown against this name :

    Additions to the config need an admin name for auditing purposes.

  • Please enter the database server name or ip address :

    This is the machine name or ip address of the server that runs the db.

  • Please enter the database name: The SQL Server DB name, e.g. pxstat.test

  • Please enter a database user name (with at least dbo privilege). If your are using a Windows account, just press Enter to skip this.

    If you enter a name, you must enter a password. Otherwise it is assumed you have AD rights to the database.

  • Please enter the path to your database folder, e.g "C:\Development\6.0.0\db:

    This is the development folder for version 6.0.0

  • Please enter the version of pxstat from which you are upgrading. For each version since the version you enter, the version sql script will be run.

  • Do you wish to run a full database upgrade?

    All db programming entities ( e.g. stored procs, types, etc) will be dropped and replaced with the current versions.

  • Do you wish to create an API config from the web config?

    In v6.0.0 the API settings that were in web.config must now be written to the database instead. This step will do that.

  • Please enter the path of the web.config file from which you wish to read, e.g. C:\PxStat\web.config

    Please ensure that this is the OLDER web.config, i.e. th one at the version from which you are upgrading.

  • Do you wish to create a Firebase Key API config entry from a Firebase.json file?

    In v6.0.0, the Firebase key is held in the API settings. This step moves the data from the source file to the database entry.

  • Do you wish to create an APP config on the database?

    Answer No if they have been created earlier.

  • Getting config details. When you have finished entering configurations, just press enter and the application.

    Answer No if they have been created earlier.

  • Do you wish to update the appsettings.json file from the web.config?

    Answer No if they have been created earlier.

  • Please create a suitable Memcached salsa for this environment.

  • Do you wish to create the log4Net.config from the web.config

    Answer No if they have been created earlier.

  • Do you wish to create an IIS web.config file from the web.config.

    Answer No if they have been created earlier.

  • Do you wish to run all of the json config upgrade scripts after the chosen version to the current version of the API config?

    Because there are additional API settings apart from the ones in the old web.config, a json file is used to pre-configure each of these.

    This file will be in the migration folder of the db folder.

Clone this wiki locally