From 4926be0afa68c4b5f3434a4763c50c8f636698ca Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Mon, 9 Nov 2020 11:11:30 +0100 Subject: [PATCH] add database table recent station --- .../Version000000Date20181013124731.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/Migration/Version000000Date20181013124731.php b/lib/Migration/Version000000Date20181013124731.php index cddfa60..716073c 100644 --- a/lib/Migration/Version000000Date20181013124731.php +++ b/lib/Migration/Version000000Date20181013124731.php @@ -42,6 +42,29 @@ class Version000000Date20181013124731 extends SimpleMigrationStep { $table->setPrimaryKey(['id']); $table->addIndex(['user_id'], 'favorites_user_id_index'); } + + if (!$schema->hasTable('recent')) { + $table = $schema->createTable('recent'); + $table->addColumn('id', 'integer', [ + 'autoincrement' => true, + 'notnull' => true, + ]); + $table->addColumn('stationuuid', 'string', [ + 'notnull' => true, + ]); + $table->addColumn('user_id', 'string', [ + 'notnull' => true, + ]); + $table->addColumn('name', 'text', [ + 'notnull' => true, + ]); + $table->addColumn('favicon', 'text'); + $table->addColumn('urlresolved', 'text'); + + $table->setPrimaryKey(['id']); + $table->addIndex(['user_id'], 'favorites_user_id_index'); + } + return $schema; } }