hasTable('notifications')) { $table = $schema->createTable('notifications'); $table->addColumn('notification_id', Types::INTEGER, [ 'autoincrement' => true, 'notnull' => true, 'length' => 4, ]); $table->addColumn('app', Types::STRING, [ 'notnull' => true, 'length' => 32, ]); $table->addColumn('user', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); $table->addColumn('timestamp', Types::INTEGER, [ 'notnull' => true, 'length' => 4, 'default' => 0, ]); $table->addColumn('object_type', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); $table->addColumn('object_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); $table->addColumn('subject', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); $table->addColumn('subject_parameters', Types::TEXT, [ 'notnull' => false, ]); $table->addColumn('message', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); $table->addColumn('message_parameters', Types::TEXT, [ 'notnull' => false, ]); $table->addColumn('link', Types::STRING, [ 'notnull' => false, 'length' => 4000, ]); $table->addColumn('icon', Types::STRING, [ 'notnull' => false, 'length' => 4000, ]); $table->addColumn('actions', Types::TEXT, [ 'notnull' => false, ]); $table->setPrimaryKey(['notification_id']); $table->addIndex(['app'], 'oc_notifications_app'); $table->addIndex(['user'], 'oc_notifications_user'); $table->addIndex(['timestamp'], 'oc_notifications_timestamp'); $table->addIndex(['object_type', 'object_id'], 'oc_notifications_object'); } // $schema->createTable('notifications_pushtokens') was // replaced with notifications_pushhash in Version2010Date20210218082811 // and deleted in Version2010Date20210218082855 return $schema; } }