aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorPeter Thienel <thienel@data-quest.de>2026-01-27 07:52:08 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2026-01-27 08:52:08 +0100
commit22ddeae213c3be8c8cebfceaae36b4bfec5a41c4 (patch)
tree6c8dca37d9f38aeaef8b970b07bd89208d2e4a35 /db
parenta09579379a8701004ed53924836639ed06d50af4 (diff)
Resolve "MVV-Studiengangsteil-Abschnitt Bearbeiten"
Closes #6172 Merge request studip/studip!4690
Diffstat (limited to 'db')
-rw-r--r--db/migrations/5.4.22_biest6172_remove_float_precision_from_cp.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/db/migrations/5.4.22_biest6172_remove_float_precision_from_cp.php b/db/migrations/5.4.22_biest6172_remove_float_precision_from_cp.php
new file mode 100644
index 0000000..59730ff
--- /dev/null
+++ b/db/migrations/5.4.22_biest6172_remove_float_precision_from_cp.php
@@ -0,0 +1,35 @@
+<?php
+
+class Biest6172RemoveFloatPrecisionFromCp extends Migration
+{
+ public function description()
+ {
+ return 'Removes the precision from float.';
+ }
+
+ public function up()
+ {
+ $query = 'ALTER TABLE `mvv_stgteilabschnitt`
+ CHANGE `kp` `kp` FLOAT NULL DEFAULT NULL';
+ DBManager::get()->execute($query);
+ $query = 'ALTER TABLE `mvv_modul`
+ CHANGE `kp` `kp` FLOAT NULL DEFAULT NULL';
+ DBManager::get()->execute($query);
+ $query = 'ALTER TABLE `mvv_modulteil`
+ CHANGE `kp` `kp` FLOAT NULL DEFAULT NULL';
+ DBManager::get()->execute($query);
+ }
+
+ public function down()
+ {
+ $query = 'ALTER TABLE `mvv_stgteilabschnitt`
+ CHANGE `kp` `kp` DOUBLE(5,2) NULL DEFAULT NULL';
+ DBManager::get()->execute($query);
+ $query = 'ALTER TABLE `mvv_modul`
+ CHANGE `kp` `kp` DOUBLE(5,2) NULL DEFAULT NULL';
+ DBManager::get()->execute($query);
+ $query = 'ALTER TABLE `mvv_modulteil`
+ CHANGE `kp` `kp` DOUBLE(5,2) NULL DEFAULT NULL';
+ DBManager::get()->execute($query);
+ }
+}