From 32aa0aa3869510557ca9e12857f49823119e040d Mon Sep 17 00:00:00 2001 From: Jonathan Treffler Date: Wed, 12 Jun 2024 01:48:59 +0200 Subject: [PATCH] add subscriptions table creation migration --- .../Version001Date20240515221000.php | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 lib/Migration/Version001Date20240515221000.php diff --git a/lib/Migration/Version001Date20240515221000.php b/lib/Migration/Version001Date20240515221000.php new file mode 100644 index 0000000..5225593 --- /dev/null +++ b/lib/Migration/Version001Date20240515221000.php @@ -0,0 +1,56 @@ +hasTable(self::SUBSCRIPTIONS_TABLE)) { + $table = $schema->createTable(self::SUBSCRIPTIONS_TABLE); + + $table->addColumn('id', Types::INTEGER, [ + 'autoincrement' => true, + 'notnull' => true, + ]); + $table->addColumn('user_id', Types::STRING, [ + 'notnull' => true, + 'length' => 200, + ]); + $table->addColumn('collection_name', Types::STRING, [ + 'notnull' => true, + 'length' => 100, + ]); + $table->addColumn('data', Types::TEXT, [ + 'notnull' => true, + ]); + $table->addColumn('creation_timestamp', Types::BIGINT, [ + 'notnull' => true, + ]); + $table->addColumn('expiration_timestamp', Types::BIGINT, [ + 'notnull' => true, + ]); + + $table->setPrimaryKey(['id']); + } + + return $schema; + } +} \ No newline at end of file