From 2916983c833ec1c73250b4e24fb99a203e54dafd Mon Sep 17 00:00:00 2001 From: Conrad Sachweh Date: Sat, 23 Oct 2021 19:02:26 +0200 Subject: [PATCH] fix: executed occ migrations:generate-from-schema --- appinfo/database.xml | 75 ------------------- .../Version0049Date20211023151735.php | 67 +++++++++++++++++ 2 files changed, 67 insertions(+), 75 deletions(-) delete mode 100644 appinfo/database.xml create mode 100644 lib/Migration/Version0049Date20211023151735.php diff --git a/appinfo/database.xml b/appinfo/database.xml deleted file mode 100644 index ef1efcc..0000000 --- a/appinfo/database.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - *dbname* - true - false - - utf8 - - - - *dbprefix*users_ispconfig - - - - - uid - text - - true - 64 - - - - displayname - text - - false - 64 - - - - mailbox - text - - false - 64 - - - - domain - text - - false - 64 - - - - users_unique - true - true - - uid - ascending - - - - - mailaddress_unique - true - - mailbox - ascending - - - domain - ascending - - - - - -
- -
diff --git a/lib/Migration/Version0049Date20211023151735.php b/lib/Migration/Version0049Date20211023151735.php new file mode 100644 index 0000000..1abeda6 --- /dev/null +++ b/lib/Migration/Version0049Date20211023151735.php @@ -0,0 +1,67 @@ +hasTable('users_ispconfig')) { + $table = $schema->createTable('users_ispconfig'); + $table->addColumn('uid', 'string', [ + 'notnull' => true, + 'length' => 64, + 'default' => '', + ]); + $table->addColumn('displayname', 'string', [ + 'notnull' => false, + 'length' => 64, + ]); + $table->addColumn('mailbox', 'string', [ + 'notnull' => false, + 'length' => 64, + ]); + $table->addColumn('domain', 'string', [ + 'notnull' => false, + 'length' => 64, + ]); + $table->setPrimaryKey(['uid']); + $table->addUniqueIndex(['mailbox', 'domain'], 'mailaddress_unique'); + } + return $schema; + } + + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + */ + public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { + } +}