Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

Commit 9047978

Browse files
authored
Merge pull request #1 from Daniel-WWU-IT/main
API updates
2 parents 7158cc8 + b0b51cf commit 9047978

35 files changed

+290
-161
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

.travis.yml

100644100755
File mode changed.

AUTHORS.md

100644100755
File mode changed.

CHANGELOG.md

100644100755
File mode changed.

COPYING

100644100755
File mode changed.

LICENSE

100644100755
File mode changed.

Makefile

100644100755
File mode changed.

README.md

100644100755
File mode changed.

appinfo/Migrations/Version20191002101015.php

100644100755
File mode changed.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
3+
namespace OCA\sciencemesh\Migrations;
4+
5+
use Doctrine\DBAL\Schema\Schema;
6+
use Doctrine\DBAL\Types\Type;
7+
use OCP\Migration\ISchemaMigration;
8+
9+
class Version20210324134421 implements ISchemaMigration
10+
{
11+
public function changeSchema(Schema $schema, array $options)
12+
{
13+
$prefix = $options['tablePrefix'];
14+
15+
// Drop any previous version, as the settings have changed completely
16+
if ($schema->hasTable("{$prefix}sciencemesh")) {
17+
$schema->dropTable("{$prefix}sciencemesh");
18+
}
19+
20+
$table = $schema->createTable("{$prefix}sciencemesh");
21+
$table->addColumn('apikey', 'string', [
22+
'notnull' => true,
23+
]);
24+
$table->addColumn('sitename', 'string', [
25+
'notnull' => true,
26+
]);
27+
$table->addColumn('siteurl', 'string', [
28+
'notnull' => true,
29+
]);
30+
$table->addColumn('siteid', 'string', [
31+
'notnull' => false,
32+
]);
33+
$table->addColumn('country', 'string', [
34+
'notnull' => true,
35+
'length' => 3,
36+
]);
37+
$table->addColumn('iopurl', 'string', [
38+
'notnull' => true,
39+
]);
40+
$table->addColumn('numusers', Type::BIGINT, [
41+
'notnull' => true,
42+
'default' => 0,
43+
'unsigned' => true,
44+
]);
45+
$table->addColumn('numfiles', Type::BIGINT, [
46+
'notnull' => true,
47+
'default' => 0,
48+
'unsigned' => true,
49+
]);
50+
$table->addColumn('numstorage', Type::BIGINT, [
51+
'notnull' => true,
52+
'default' => 0,
53+
'unsigned' => true,
54+
]);
55+
}
56+
}

0 commit comments

Comments
 (0)