Back (Current repo: scraps)

random scraps and notes that are useful to me
To clone this repository:
git clone https://git.viktor1993.net/scraps.git
Log | Download | Files | Refs

commit de7d1f8a6238e92da165625ec74725ec0028f278
parent 41c8fd99c1f8c8ca947e2cd89f9209c9ebfe64db
Author: root <root>
Date:   Sat, 26 Apr 2025 17:09:46 +0200

fix accidental extra newline

Diffstat:
Mbash/funcs/daily_range_partition.sh | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bash/funcs/daily_range_partition.sh b/bash/funcs/daily_range_partition.sh @@ -10,8 +10,7 @@ echo "ALTER TABLE some_table DROP PARTITION pFuture; ALTER TABLE some_table ADD #drop old partitions OLD_PART=$(date -d "$DD - 6 months" +%Y%m%d) -for PART in $(echo "SELECT partition_name FROM information_schema.partitions WHERE table_name = 'some_table' AND partition_method = ' -RANGE';" | $MARIADB --skip-column-names | grep -v Future) +for PART in $(echo "SELECT partition_name FROM information_schema.partitions WHERE table_name = 'some_table' AND partition_method = 'RANGE';" | $MARIADB --skip-column-names | grep -v Future) do PART_DATE="${PART:1}" #drop prefix p to extract date portion PART_DATE_TEMP="${PART_DATE:0:4}-${PART_DATE:4:2}-${PART_DATE:6:2}"