Skip to content

paicoretech/db-cna-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PAiCore Technology – DB Scripts

Database deployment

The following steps are to setup the custom structure for this customer, where Partition Tables are used and the shell scripts are jobs to be scheduled in Crontab process to create the tables per hour or per day, according to the configuration in the script located at scripts/partition-tables/run.sh.

1. Database scripts Run the below SQL files to create the objects in the database: e.g. psql -h <db_host> -U <db_username> -d <db_name> < <script.sql>

  • tables.sql to create the protocols partition tables, other tables and their corresponding indexes.
  • views.sql to create the Views.
  • functions.sql to create the Functions.
  • data.sql to insert the command_code, diameter_dictionary, dra_peers and ip_names default data.

2. Crontab scripts The "scripts" folder contains scripts to be configured as crontab jobs. Apply the configuration below:

# m h  dom mon dow   command
0 0 * * * /path/to/scripts/remove-temp-downloads/run.sh
0 0 * * * /path/to/scripts/partition-tables/run.sh
0 3 * * * /path/to/scripts/calculate-size-tables/run.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors