diff --git a/.travis.yml b/.travis.yml
index 3a1c7b1..715331b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,7 +20,6 @@ addons:
env:
global:
- - CORE_TYPE=nextcloud
- CORE_BRANCH=master
- APP_NAME=notifications
matrix:
@@ -43,8 +42,6 @@ matrix:
env: DB=sqlite CORE_BRANCH=stable18
- php: 7.2
env: DB=sqlite CORE_BRANCH=stable17
- - php: 7.3
- env: DB=sqlite CORE_BRANCH=master CORE_TYPE=owncloud
fast_finish: true
before_install:
diff --git a/appinfo/database.xml b/appinfo/database.xml
deleted file mode 100644
index 290e003..0000000
--- a/appinfo/database.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
- *dbname*
- true
- false
- utf8
-
- *dbprefix*registration
-
-
- id
- integer
- true
- true
- true
- true
-
-
- email
- text
- true
-
-
- username
- text
-
-
- password
- text
-
-
- displayname
- text
-
-
- email_confirmed
- boolean
- false
-
-
- token
- text
- true
-
-
- client_secret
- text
-
-
- requested
- timestamp
- true
-
-
-
-
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 5e27f76..0d6fd3c 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -27,7 +27,7 @@ This app allows users to register a new account.
Send Ethereum to `0x941613eBB948C2C547cb957B55fEB2609fa6Fe66`
Send BTC to `33pStaSaf4sDUA8XBAHTq7ZDQpCVFQArxQ`
]]>
- 0.4.7
+ 0.5.0
agpl
Pellaeon Lin
security
@@ -40,7 +40,6 @@ Send BTC to `33pStaSaf4sDUA8XBAHTq7ZDQpCVFQArxQ`
sqlite
pgsql
mysql
-
diff --git a/lib/Migration/Version0005Date20200710135953.php b/lib/Migration/Version0005Date20200710135953.php
new file mode 100644
index 0000000..278baae
--- /dev/null
+++ b/lib/Migration/Version0005Date20200710135953.php
@@ -0,0 +1,80 @@
+
+ *
+ * @author Joas Schilling
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ */
+namespace OCA\Registration\Migration;
+
+use Closure;
+use Doctrine\DBAL\Types\Type;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version0005Date20200710135953 extends SimpleMigrationStep {
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ * @return null|ISchemaWrapper
+ */
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ if (!$schema->hasTable('registration')) {
+ $table = $schema->createTable('registration');
+ $table->addColumn('id', Type::INTEGER, [
+ 'autoincrement' => true,
+ 'notnull' => true,
+ 'unsigned' => true,
+ ]);
+ $table->addColumn('email', Type::STRING, [
+ 'notnull' => true,
+ ]);
+ $table->addColumn('username', Type::STRING, [
+ 'notnull' => false,
+ ]);
+ $table->addColumn('password', Type::STRING, [
+ 'notnull' => false,
+ ]);
+ $table->addColumn('displayname', Type::STRING, [
+ 'notnull' => false,
+ ]);
+ $table->addColumn('email_confirmed', Type::BOOLEAN, [
+ 'notnull' => false,
+ 'default' => false,
+ ]);
+ $table->addColumn('token', Type::STRING, [
+ 'notnull' => true,
+ ]);
+ $table->addColumn('client_secret', Type::STRING, [
+ 'notnull' => false,
+ ]);
+ $table->addColumn('requested', Type::DATETIME, [
+ 'notnull' => true,
+ ]);
+ $table->setPrimaryKey(['id']);
+ }
+ return $schema;
+ }
+}
diff --git a/tests/scripts/core-download.sh b/tests/scripts/core-download.sh
index 945b387..cc90336 100644
--- a/tests/scripts/core-download.sh
+++ b/tests/scripts/core-download.sh
@@ -10,8 +10,7 @@ export BUILD_CORE_DIR="${BUILD_ROOT_DIR}/core"
export BUILD_APPS_DIR="${BUILD_CORE_DIR}/apps"
export BUILD_APP_MODULE_DIR="${BUILD_APPS_DIR}/registration"
-if [[ ${CORE_TYPE} == 'owncloud' ]]; then git clone https://github.com/owncloud/core.git --recursive --depth 1 -b ${CORE_BRANCH} ${BUILD_CORE_DIR}; fi
-if [[ ${CORE_TYPE} == 'nextcloud' ]]; then git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${CORE_BRANCH} ${BUILD_CORE_DIR}; fi
+git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${CORE_BRANCH} ${BUILD_CORE_DIR}
mv ${BUILD_ROOT_DIR}/registration ${BUILD_APPS_DIR}
diff --git a/tests/scripts/core-setup.sh b/tests/scripts/core-setup.sh
index 5481f53..df26b39 100755
--- a/tests/scripts/core-setup.sh
+++ b/tests/scripts/core-setup.sh
@@ -6,8 +6,6 @@ set -e
cd ${BUILD_CORE_DIR}
-if [[ ${CORE_TYPE} == 'owncloud' ]]; then composer install -o --prefer-dist --no-suggest --no-interaction; fi
-
# Set up core
php -f occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database ${DB} --database-pass=''