hasTable(WebhookListenerMapper::TABLE_NAME)) { $table = $schema->createTable(WebhookListenerMapper::TABLE_NAME); $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 4, ]); $table->addColumn('app_id', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); $table->addColumn('user_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); $table->addColumn('http_method', Types::STRING, [ 'notnull' => true, 'length' => 32, ]); $table->addColumn('uri', Types::STRING, [ 'notnull' => true, 'length' => 4000, ]); $table->addColumn('event', Types::STRING, [ 'notnull' => true, 'length' => 4000, ]); $table->addColumn('event_filter', Types::TEXT, [ 'notnull' => false, ]); $table->addColumn('user_id_filter', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); $table->addColumn('headers', Types::TEXT, [ 'notnull' => false, ]); $table->addColumn('auth_method', Types::STRING, [ 'notnull' => true, 'length' => 16, 'default' => '', ]); $table->addColumn('auth_data', Types::TEXT, [ 'notnull' => false, ]); $table->setPrimaryKey(['id']); return $schema; } return null; } }