myCRM/migrations/Version20251112142215.php
olli 3c36fdd9a1 feat: Add Document and GitRepository entities with repositories and services
- Created Document entity with properties for file management, including filename, originalFilename, mimeType, size, uploadedAt, uploadedBy, relatedEntity, relatedEntityId, and description.
- Implemented DocumentRepository for querying documents by related entity and user.
- Added GitRepository entity with properties for managing Git repositories, including URL, localPath, branch, provider, accessToken, project, lastSync, name, description, createdAt, and updatedAt.
- Implemented GitRepositoryRepository for querying repositories by project.
- Developed GitHubService for interacting with GitHub API, including methods for fetching commits, contributions, branches, and repository info.
- Developed GitService for local Git repository interactions, including methods for fetching commits, contributions, branches, and repository info.
- Developed GiteaService for interacting with Gitea API, including methods for fetching commits, contributions, branches, repository info, and testing connection.
2025-11-12 16:14:18 +01:00

34 lines
944 B
PHP

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20251112142215 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add provider and access_token fields to git_repository table';
}
public function up(Schema $schema): void
{
// Add new fields to existing git_repository table
$this->addSql('ALTER TABLE git_repository ADD provider VARCHAR(50) DEFAULT NULL');
$this->addSql('ALTER TABLE git_repository ADD access_token VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// Remove the added fields
$this->addSql('ALTER TABLE git_repository DROP provider');
$this->addSql('ALTER TABLE git_repository DROP access_token');
}
}