hasTable(WebhookListenerMapper::TABLE_NAME)) { $table = $schema->getTable(WebhookListenerMapper::TABLE_NAME); if (!$table->hasColumn('token_needed')) { $schemaHasChanged = true; $table->addColumn('token_needed', Types::TEXT, [ 'notnull' => false, ]); } } if (!$schema->hasTable(EphemeralTokenMapper::TABLE_NAME)) { $schemaHasChanged = true; $table = $schema->createTable(EphemeralTokenMapper::TABLE_NAME); $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, ]); $table->addColumn('token_id', Types::BIGINT, [ 'notnull' => true, 'length' => 4, 'unsigned' => true, ]); $table->addColumn('user_id', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); $table->addColumn('created_at', Types::BIGINT, [ 'notnull' => true, 'length' => 4, 'unsigned' => true, ]); $table->setPrimaryKey(['id']); } return $schemaHasChanged ? $schema : null; } }