Browse Source

[update] create remote table

NorbertNader 2 years ago
parent
commit
c78ff4fe91
2 changed files with 13 additions and 3 deletions
  1. 13
    0
      modules/Utils/FileStorage/FileStorageInstall.php
  2. 0
    3
      tests/config.example.yml

+ 13
- 0
modules/Utils/FileStorage/FileStorageInstall.php View File

@@ -43,6 +43,19 @@ class Utils_FileStorageInstall extends ModuleInstall {
43 43
             return false;
44 44
         }
45 45
 
46
+		$ret &= DB::CreateTable('utils_filestorage_remote', '
47
+			id I8 AUTO KEY,
48
+			token C(128) NOTNULL,
49
+            created_on T NOTNULL,
50
+            created_by I8 NOTNULL,
51
+            expires_on T,
52
+            times_downloaded I8',
53
+			['constraints' => ', FOREIGN KEY (id) REFERENCES utils_filestorage(id)']);
54
+		if (!$ret) {
55
+			print('Unable to create table utils_filestorage_files.<br>');
56
+			return false;
57
+		}
58
+
46 59
         $this->create_data_dir();
47 60
         file_put_contents($this->get_data_dir() . '.htaccess', 'deny from all');
48 61
         return $ret;

+ 0
- 3
tests/config.example.yml View File

@@ -1,3 +0,0 @@
1
-# Example config file. Copy to config.yml
2
-
3
-URL: "http://localhost/epesi/"

Loading…
Cancel
Save