------------------------------------- SQL script update procedure ------------------------------------- To update the .sql files in this directory, follow the following steps. SOURCE = directory of the root of your checkout * Build and install this package ("ResourceAssignmentDatabase"): mkdir -p ~/build/gnu_opt && cd ~/build/gnu_opt cmake -DBUILD_PACKAGES=ResourceAssignmentDatabase $SOURCE make -j 8 install * Add its paths to your environment: source ~/build/gnu_opt/installed/lofarinit.sh * Go back to this source dir cd $SOURCE/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql * Regenerate the .sql files ./create_add_notifications.sql.py ./create_add_virtual_instrument.sql.py ------------------------------------- Database creation procedure (test system) ------------------------------------- To create a fresh and empty RADB, follow the following steps. * Obtain credentials. Login as lofarsys@scu199 and: * Copy *.sql to scu199 and go there: scp *.sql scu199: ssh scu199 * Obtain/adjust the relevant credentials. As lofarsys: cat ~/.lofar/dbcredentials/radb.ini * If you want a NEW database, create one (see radb.ini for the relevant parameters): (see create_database.sql) * Reinitialise the database (see radb.ini for the relevant parameters): psql -h $DBHOST $DATABASE -U $DBUSER -f create_and_populate_database.sql -W * Ignore all NOTICES.
Select Git revision
sql
-
-
- Open in your IDE
- Download source code
- Download this directory

Jorrit Schaap
authored
Task #10811: made resource_usage table and view, and made trigger functions which automatically fill/update/clean the resource_usage table whenever a resource _claim is inserted/updated/deleted
Code owners
Assign users and groups as approvers for specific file changes. Learn more.