Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/setup/upgrade/0.9.9/rename_columns.php
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-02-01 09:05:48 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-02-01 09:05:48 +0100
commit6854cb3f4d8219cf1829e32122eb2502a916eae9 (patch)
tree350feb504587d932e02837a1442b059759927646 /setup/upgrade/0.9.9/rename_columns.php
initial checkin
Diffstat (limited to 'setup/upgrade/0.9.9/rename_columns.php')
-rw-r--r--setup/upgrade/0.9.9/rename_columns.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/setup/upgrade/0.9.9/rename_columns.php b/setup/upgrade/0.9.9/rename_columns.php
new file mode 100644
index 0000000..07a949a
--- /dev/null
+++ b/setup/upgrade/0.9.9/rename_columns.php
@@ -0,0 +1,14 @@
+<?php
+ /**********************************************************\
+ | This script renames columns, adodb seems to have prob here|
+ \**********************************************************/
+
+$dict = NewDataDictionary($db->dblink);
+
+$sqlarray = $dict->RenameColumnSQL($conf['database']['dbprefix'] . 'tasks', 'attached_to_project', 'project_id', 'TYPE INT(3) NOTNULL DEFAULT 0');
+$dict->ExecuteSQLArray($sqlarray);
+
+$sqlarray = $dict->RenameColumnSQL($conf['database']['dbprefix'] . 'groups', 'belongs_to_project', 'project_id', ' TYPE INT(3) NOTNULL DEFAULT 0');
+$dict->ExecuteSQLArray($sqlarray);
+
+?> \ No newline at end of file