aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2025-12-19 08:44:03 +0100
committerThomas Hackl <hackl@data-quest.de>2025-12-19 08:44:03 +0100
commit1c78a3b0a73e72d34714fa749aff293dbda6b4d2 (patch)
treea6638fb62ef5e672b0e326ebeb204e8f47afafeb /db
parent4e8a808e1a3a0c6698afaacf50173051bcf1dcee (diff)
Resolve "Deeplinks und Definition von Kurz-URLs"
Closes #5896 Merge request studip/studip!4570
Diffstat (limited to 'db')
-rw-r--r--db/migrations/6.2.3_add_short_urls.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/db/migrations/6.2.3_add_short_urls.php b/db/migrations/6.2.3_add_short_urls.php
new file mode 100644
index 0000000..eea9548
--- /dev/null
+++ b/db/migrations/6.2.3_add_short_urls.php
@@ -0,0 +1,34 @@
+<?php
+
+/**
+ * Description of class.
+ * Second line
+ */
+final class AddShortUrls extends Migration
+{
+ public function description()
+ {
+ return 'Adds the short_urls table.';
+ }
+
+ public function up()
+ {
+ DBManager::get()->exec(
+ "CREATE TABLE IF NOT EXISTS short_urls (
+ id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
+ alias VARCHAR(255) UNIQUE NOT NULL,
+ path VARCHAR(255) NOT NULL,
+ title VARCHAR(255) NOT NULL,
+ user_id VARCHAR(32) COLLATE latin1_bin NOT NULL,
+ mkdate INT(11) UNSIGNED NOT NULL,
+ chdate INT(11) UNSIGNED NOT NULL
+ )"
+ );
+ }
+
+
+ public function down()
+ {
+ DBManager::get()->exec("DROP TABLE short_urls");
+ }
+}