Fixed a bug in Database->_age_out_data() where checking if a table existed was hard coded to one table.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 3 years ago
parent f77f486775
commit ec3b3d2ac9
  1. 2
      Anvil/Tools/Database.pm
  2. 52
      notes

@ -16739,7 +16739,7 @@ sub _age_out_data
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { table => $table }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { table => $table }});
# Does the table exist? # Does the table exist?
$query = "SELECT COUNT(*) FROM pg_catalog.pg_tables WHERE tablename='scan_apc_pdus' AND schemaname='public';"; $query = "SELECT COUNT(*) FROM pg_catalog.pg_tables WHERE tablename=".$anvil->Database->quote($table)." AND schemaname='public';";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { query => $query }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { query => $query }});
my $count = $anvil->Database->query({query => $query, source => $THIS_FILE, line => __LINE__})->[0]->[0]; my $count = $anvil->Database->query({query => $query, source => $THIS_FILE, line => __LINE__})->[0]->[0];

52
notes

@ -771,10 +771,10 @@ mediawiki on EL8 install notes (starting from a minimal install);
dnf module reset php dnf module reset php
dnf module enable php:7.4 dnf module enable php:7.4
# PgSQL # All
dnf install httpd php php-gd php-xml php-mbstring php-json \ dnf install httpd php php-gd php-xml php-mbstring php-json \
vim bash-completion wget tar rsync mlocate php-pecl-apcu \ vim bash-completion wget tar rsync mlocate php-pecl-apcu \
memcached php-pear icu php-intl php-pgsql bzip2 memcached php-pear icu php-intl php-pgsql bzip2 mod_ssl
### PostgreSQL ### PostgreSQL
dnf install postgresql-server postgresql-plperl dnf install postgresql-server postgresql-plperl
@ -783,7 +783,9 @@ systemctl start postgresql.service
systemctl enable postgresql.service systemctl enable postgresql.service
### MariaDB ### MariaDB
dnf install php-mysqlnd php-gd php-xml mariadb-server mariadb dnf install httpd php php-gd php-xml php-mbstring php-json \
php-mysqlnd php-gd php-xml mariadb-server mariadb \
systemctl start mariadb systemctl start mariadb
mysql_secure_installation mysql_secure_installation
|Set root password? [Y/n] y |Set root password? [Y/n] y
@ -796,25 +798,25 @@ mysql_secure_installation
|Reload privilege tables now? [Y/n] y |Reload privilege tables now? [Y/n] y
mysql -u root -p mysql -u root -p
### In mariadb ### In mariadb
MariaDB [(none)]> CREATE DATABASE digimer_wiki; MariaDB [(none)]> CREATE DATABASE an_wiki;
MariaDB [(none)]> CREATE USER 'digimer'@'localhost' IDENTIFIED BY 'Initial1'; MariaDB [(none)]> CREATE USER 'alteeve'@'localhost' IDENTIFIED BY 'experience tell mineral';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON digimer_wiki.* TO 'digimer'@'localhost'; MariaDB [(none)]> GRANT ALL PRIVILEGES ON an_wiki.* TO 'alteeve'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> SHOW DATABASES; MariaDB [(none)]> SHOW DATABASES;
+--------------------+ +--------------------+
| Database | | Database |
+--------------------+ +--------------------+
| digimer_wiki | | an_wiki |
| information_schema | | information_schema |
| mysql | | mysql |
| performance_schema | | performance_schema |
+--------------------+ +--------------------+
MariaDB [(none)]> SHOW GRANTS FOR 'digimer'@'localhost'; MariaDB [(none)]> SHOW GRANTS FOR 'alteeve'@'localhost';
+----------------------------------------------------------------------------------------------------------------+ +----------------------------------------------------------------------------------------------------------------+
| Grants for digimer@localhost | | Grants for digimer@localhost |
+----------------------------------------------------------------------------------------------------------------+ +----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `digimer`@`localhost` IDENTIFIED BY PASSWORD '*xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | | GRANT USAGE ON *.* TO `digimer`@`localhost` IDENTIFIED BY PASSWORD '*xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' |
| GRANT ALL PRIVILEGES ON `digimer_wiki`.* TO `digimer`@`localhost` | | GRANT ALL PRIVILEGES ON `an_wiki`.* TO `digimer`@`localhost` |
+----------------------------------------------------------------------------------------------------------------+ +----------------------------------------------------------------------------------------------------------------+
MariaDB [(none)]> exit MariaDB [(none)]> exit
# Back to terminal # Back to terminal
@ -863,6 +865,38 @@ tar -xvzf mediawiki-1.37.1.tar.gz
cd /var/www/html cd /var/www/html
ln -s ../mediawiki-1.37.1 ./w ln -s ../mediawiki-1.37.1 ./w
systemctl enable httpd.service
systemctl enable memcached.service
systemctl start httpd.service
systemctl start memcached.service
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --zone=public --add-service=https --permanent
firewall-cmd --reload
### Certbot / Let's Encrypt
# EPEL / snapd
dnf config-manager --set-enabled powertools
dnf install epel-release epel-next-release
dnf install snapd
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
### Setup vhost
# httpd.conf
### Log out and back in to ensure snapd path
# If the next step fails with "too early for operation, device not yet seeded or device model not acknowledged", restart snapd
snap install core
snap refresh core
snap install --classic certbot
# certbot
certbot --apache
# answer questions
==== ====
Dell S4128T-ON Configuration Dell S4128T-ON Configuration

Loading…
Cancel
Save