aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/update
diff options
context:
space:
mode:
authorM.Gergo2020-03-24 15:53:18 +0100
committerM.Gergo2020-03-24 15:53:18 +0100
commit351ace3031cf063cef346027ae209d218225242a (patch)
tree11d7f1b7e30df558a54ed9f4a66598cf66de4a67 /mayor-orig/mayor-naplo/update
parent16626ba293babee3cd822e08021c7334282a8a6b (diff)
downloadmayor-rev4632.tar.gz
mayor-rev4632.zip
Rev: 4632rev4632
Diffstat (limited to 'mayor-orig/mayor-naplo/update')
-rw-r--r--mayor-orig/mayor-naplo/update/pre004630-1-naplo.sql26
-rw-r--r--mayor-orig/mayor-naplo/update/pre004630-2.sh17
2 files changed, 43 insertions, 0 deletions
diff --git a/mayor-orig/mayor-naplo/update/pre004630-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004630-1-naplo.sql
new file mode 100644
index 00000000..1d9798ae
--- /dev/null
+++ b/mayor-orig/mayor-naplo/update/pre004630-1-naplo.sql
@@ -0,0 +1,26 @@
+DELIMITER $$
+DROP PROCEDURE IF EXISTS upgrade_database_4630 $$
+
+CREATE PROCEDURE upgrade_database_4630()
+BEGIN
+SET NAMES utf8 COLLATE utf8_hungarian_ci;
+
+IF NOT EXISTS (
+ SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='oraHazifeladatDiak' and COLUMN_NAME='hazifeladatDiakFilename'
+) THEN
+
+ALTER TABLE `oraHazifeladatDiak` ADD `hazifeladatDiakFilename` varchar(255) COLLATE utf8_hungarian_ci DEFAULT NULL;
+
+END IF;
+
+IF NOT EXISTS (
+ SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='oraHazifeladatDiak' and COLUMN_NAME='hazifeladatDiakOrigFilename'
+) THEN
+
+ALTER TABLE `oraHazifeladatDiak` ADD `hazifeladatDiakOrigFilename` varchar(255) COLLATE utf8_hungarian_ci DEFAULT NULL;
+
+END IF;
+
+END $$
+DELIMITER ;
+CALL upgrade_database_4630();
diff --git a/mayor-orig/mayor-naplo/update/pre004630-2.sh b/mayor-orig/mayor-naplo/update/pre004630-2.sh
new file mode 100644
index 00000000..4ba7e643
--- /dev/null
+++ b/mayor-orig/mayor-naplo/update/pre004630-2.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+#BASEDIR="/var/mayor"
+
+DIR="$BASEDIR/download/parent/naplo/haladasi/"
+mkdir -p $DIR
+chown -R www-data $DIR
+echo "$DIR Kész."
+
+DIR="$BASEDIR/download/private/naplo/haladasi/hazifeladat"
+mkdir -p $DIR
+chown -R www-data $DIR
+echo "$DIR Kész."
+
+LNDIR="$BASEDIR/download/parent/naplo/haladasi/"
+ln -s $DIR $LNDIR
+echo "$LNDIR Kész."