From 3b1fb0c07e31c2587e6f1c61a007897d9a680925 Mon Sep 17 00:00:00 2001 From: Phie Date: Sun, 11 Jul 2021 22:05:07 +0200 Subject: migrate from database.xml to migration files --- appinfo/database.xml | 40 -------------- lib/Migration/Version002401Date20210711195249.php | 64 +++++++++++++++++++++++ 2 files changed, 64 insertions(+), 40 deletions(-) delete mode 100644 appinfo/database.xml create mode 100644 lib/Migration/Version002401Date20210711195249.php diff --git a/appinfo/database.xml b/appinfo/database.xml deleted file mode 100644 index 03f676b..0000000 --- a/appinfo/database.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - *dbname* - true - false - utf8 - - *dbprefix*carnet_metadata - - - path - text - true - 191 - - - - path - - indexpath - true - - - metadata - text - 10000000 - - - - last_modification_file - integer - - - low_case_text - text - 10000000 - - -
-
\ No newline at end of file diff --git a/lib/Migration/Version002401Date20210711195249.php b/lib/Migration/Version002401Date20210711195249.php new file mode 100644 index 0000000..9e8c7eb --- /dev/null +++ b/lib/Migration/Version002401Date20210711195249.php @@ -0,0 +1,64 @@ +hasTable('carnet_metadata')) { + $table = $schema->createTable('carnet_metadata'); + $table->addColumn('path', 'string', [ + 'notnull' => true, + 'length' => 191, + ]); + $table->addColumn('metadata', 'string', [ + 'notnull' => false, + 'length' => 10000000, + ]); + $table->addColumn('last_modification_file', 'integer', [ + 'notnull' => false, + ]); + $table->addColumn('low_case_text', 'string', [ + 'notnull' => false, + 'length' => 10000000, + ]); + $table->addUniqueIndex(['path'], 'indexpath'); + } + 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 { + } +} -- cgit v1.2.3