Updating MariaDb Translate scripts
This commit is contained in:
2
Translate/Database/ReadMe.txt
Normal file
2
Translate/Database/ReadMe.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
These scripts go in the /mnt/Mariadb folder
|
||||
|
||||
46
Translate/Database/optimize.sql
Executable file
46
Translate/Database/optimize.sql
Executable file
@@ -0,0 +1,46 @@
|
||||
PURGE BINARY LOGS BEFORE NOW();
|
||||
|
||||
USE market_data;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE analystpricetarget;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE analystratings;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE balancesheet;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE incomestatement;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE cashflowstatement;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE dividendhistory;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE etfholdings;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE fundamentals;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE historical;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE insidertransaction;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE options;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE prices;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE secfilings;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE valuations;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE yieldcurve;
|
||||
|
||||
use portfolio_data;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE accounts;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE cash;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE trades;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE watchlist;
|
||||
|
||||
OPTIMIZE NO_WRITE_TO_BINLOG TABLE watchlists;
|
||||
|
||||
2
Translate/Database/optimizedb.sh
Executable file
2
Translate/Database/optimizedb.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
sudo mysql -u root -pdbas --default-character-set=utf8mb4 < optimize.sql
|
||||
7
Translate/Database/restoredb.sh
Executable file
7
Translate/Database/restoredb.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
sudo mysql -u root -pdbas --default-character-set=utf8mb4 < backupdb2.sql
|
||||
sudo mysql -u root -pdbas --default-character-set=utf8mb4 < optimize.sql
|
||||
sudo service mariadb stop
|
||||
sudo truncate /var/log/mariadb/adrastea.log -s 0
|
||||
sudo truncate /var/log/mariadb/adrastea-slow.log -s 0
|
||||
sudo service mariadb start
|
||||
1224
Translate/Database/schema.sql
Normal file
1224
Translate/Database/schema.sql
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,7 @@
|
||||
#!/bin/bash
|
||||
cd /home/pi/ARM64/Translate/Translate/bin/Debug/net8.0
|
||||
./translate /mnt/mariadb/backupdb.sql /mnt/mariadb/backupdb2.sql
|
||||
cd /mnt/mariadb
|
||||
./restoredb.sh
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user