Skip to content

Commit d81aa05

Browse files
authored
feat: git integration V2 (#3362)
1 parent ef2c30e commit d81aa05

82 files changed

Lines changed: 4272 additions & 3049 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

backend/.env.dist.composed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Kafka settings
22
CROWD_KAFKA_BROKERS=kafka:9092
3+
CROWD_KAFKA_TOPIC=data-sink-worker-normal
34

45
# Redis settings
56
CROWD_REDIS_HOST=redis
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
DROP TRIGGER IF EXISTS cleanup_orphaned_repositories_trigger ON git."repositoryIntegrations";
2+
3+
-- Drop function
4+
DROP FUNCTION IF EXISTS git.cleanup_orphaned_repositories();
5+
6+
-- Drop indexes
7+
DROP INDEX IF EXISTS "ix_git_repositoryIntegrations_integrationId";
8+
DROP INDEX IF EXISTS "ix_git_repositoryIntegrations_repositoryId";
9+
DROP INDEX IF EXISTS "ix_git_repositories_lastProcessedAt";
10+
DROP INDEX IF EXISTS "ix_git_repositories_state_priority";
11+
DROP INDEX IF EXISTS "ix_git_repositories_priority";
12+
DROP INDEX IF EXISTS "ix_git_repositories_state";
13+
14+
-- Drop tables
15+
DROP TABLE IF EXISTS git."repositoryIntegrations";
16+
DROP TABLE IF EXISTS git.repositories;
17+
18+
-- Drop schema
19+
DROP SCHEMA IF EXISTS git CASCADE;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Remove lockedAt column from git.repositories table
2+
-- Rollback for V1751635377__addLockedAtToRepositories.sql
3+
4+
ALTER TABLE git.repositories
5+
DROP COLUMN IF EXISTS "lockedAt";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE git.repositories
2+
DROP COLUMN IF EXISTS "lastProcessedCommit";
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
DROP INDEX IF EXISTS "ix_git_repositories_integrationId_segmentId";
2+
DROP INDEX IF EXISTS "ix_git_repositories_segmentId";
3+
DROP INDEX IF EXISTS "ix_git_repositories_integrationId";
4+
5+
ALTER TABLE git.repositories
6+
DROP COLUMN IF EXISTS "integrationId",
7+
DROP COLUMN IF EXISTS "segmentId";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE git.repositories
2+
DROP COLUMN IF EXISTS "lastMaintainerRunAt";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE git.repositories
2+
DROP COLUMN IF EXISTS "maintainerFile";
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ALTER TABLE "maintainersInternal"
2+
DROP COLUMN IF EXISTS "originalRole",
3+
DROP COLUMN IF EXISTS "startDate",
4+
DROP COLUMN IF EXISTS "endDate";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- Down migration: Remove service executions table and related objects
2+
3+
-- Drop trigger first
4+
DROP TRIGGER IF EXISTS trigger_auto_cleanup_service_executions ON git."serviceExecutions";
5+
6+
-- Drop trigger function
7+
DROP FUNCTION IF EXISTS git.trigger_cleanup_service_executions();
8+
9+
-- Drop indexes
10+
DROP INDEX IF EXISTS git."idx_serviceExecutions_composite";
11+
DROP INDEX IF EXISTS git."idx_serviceExecutions_createdAt";
12+
DROP INDEX IF EXISTS git."idx_serviceExecutions_status";
13+
DROP INDEX IF EXISTS git."idx_serviceExecutions_operationType";
14+
DROP INDEX IF EXISTS git."idx_serviceExecutions_repoId";
15+
16+
-- Drop table (this will also drop the foreign key constraint)
17+
DROP TABLE IF EXISTS git."serviceExecutions";
18+
19+
-- Drop ENUM type
20+
DROP TYPE IF EXISTS git.execution_status;

0 commit comments

Comments
 (0)