fix: [CI-15948]: Changing build_deploy_id to BIG INT (#3618)

drone v2.26.0
ShobhitSingh11 2025-02-28 17:26:51 +05:30 committed by GitHub
parent 3e7ecf1615
commit 4f85961434
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -200,6 +200,10 @@ var migrations = []struct {
name: "create-new-table-cards",
stmt: createNewTableCards,
},
{
name: "alter-table-builds-alter-column-deploy-id",
stmt: alterTableBuildsAlterColumnDeployId,
},
}
// Migrate performs the database migration. If the migration fails
@ -769,3 +773,9 @@ CREATE TABLE IF NOT EXISTS cards
FOREIGN KEY (card_id) REFERENCES steps (step_id) ON DELETE CASCADE
);
`
var alterTableBuildsAlterColumnDeployId = `
ALTER TABLE builds
ALTER COLUMN build_deploy_id SET DATA TYPE BIGINT,
ALTER COLUMN build_deploy_id SET NOT NULL,
ALTER COLUMN build_deploy_id SET DEFAULT 0;
`

View File

@ -0,0 +1,4 @@
ALTER TABLE builds
ALTER COLUMN build_deploy_id SET DATA TYPE BIGINT,
ALTER COLUMN build_deploy_id SET NOT NULL,
ALTER COLUMN build_deploy_id SET DEFAULT 0;