Add SQL update instructions
authorjoshuaruesweg <ruesweg@woltlab.com>
Thu, 4 Mar 2021 18:46:05 +0000 (19:46 +0100)
committerjoshuaruesweg <ruesweg@woltlab.com>
Tue, 16 Mar 2021 15:19:13 +0000 (16:19 +0100)
wcfsetup/install/files/acp/database/update_com.woltlab.wcf_5.4.php

index 7012ff3321a7bc5d08a47498ec798401eeacae48..11f481584c32dcb03084f5d1e5bd7e115e124d46 100644 (file)
@@ -20,6 +20,7 @@ use wcf\system\database\table\column\NotNullVarchar255DatabaseTableColumn;
 use wcf\system\database\table\column\ObjectIdDatabaseTableColumn;
 use wcf\system\database\table\column\TextDatabaseTableColumn;
 use wcf\system\database\table\column\VarbinaryDatabaseTableColumn;
+use wcf\system\database\table\column\VarcharDatabaseTableColumn;
 use wcf\system\database\table\DatabaseTable;
 use wcf\system\database\table\index\DatabaseTableForeignKey;
 use wcf\system\database\table\index\DatabaseTableIndex;
@@ -219,4 +220,34 @@ return [
         ->columns([
             DefaultFalseBooleanDatabaseTableColumn::create('invertPermissions'),
         ]),
+
+    DatabaseTable::create('wcf1_unfurl_url')
+        ->columns([
+            ObjectIdDatabaseTableColumn::create('urlID'),
+            TextDatabaseTableColumn::create('url')
+                ->notNull(),
+            VarcharDatabaseTableColumn::create('urlHash')
+                ->notNull()
+                ->length(40),
+            NotNullVarchar255DatabaseTableColumn::create('title'),
+            TextDatabaseTableColumn::create('description')
+                ->notNull(),
+            TextDatabaseTableColumn::create('imageUrl')
+                ->notNull()
+                ->defaultValue(''),
+            NotNullVarchar255DatabaseTableColumn::create('imageType')
+                ->defaultValue('NOIMAGE'),
+            VarcharDatabaseTableColumn::create('imageHash')
+                ->notNull()
+                ->length(45),
+            NotNullVarchar255DatabaseTableColumn::create('status')
+                ->defaultValue('PENDING'),
+        ])
+        ->indices([
+            DatabaseTablePrimaryIndex::create()
+                ->columns(['urlID']),
+            DatabaseTableIndex::create('urlHash')
+                ->type(DatabaseTableIndex::UNIQUE_TYPE)
+                ->columns(['urlHash']),
+        ]),
 ];