Skip to content

Commit 4f85961

Browse files
fix: [CI-15948]: Changing build_deploy_id to BIG INT (#3618)
1 parent 3e7ecf1 commit 4f85961

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

store/shared/migrate/postgres/ddl_gen.go

+10
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ var migrations = []struct {
200200
name: "create-new-table-cards",
201201
stmt: createNewTableCards,
202202
},
203+
{
204+
name: "alter-table-builds-alter-column-deploy-id",
205+
stmt: alterTableBuildsAlterColumnDeployId,
206+
},
203207
}
204208

205209
// Migrate performs the database migration. If the migration fails
@@ -769,3 +773,9 @@ CREATE TABLE IF NOT EXISTS cards
769773
FOREIGN KEY (card_id) REFERENCES steps (step_id) ON DELETE CASCADE
770774
);
771775
`
776+
var alterTableBuildsAlterColumnDeployId = `
777+
ALTER TABLE builds
778+
ALTER COLUMN build_deploy_id SET DATA TYPE BIGINT,
779+
ALTER COLUMN build_deploy_id SET NOT NULL,
780+
ALTER COLUMN build_deploy_id SET DEFAULT 0;
781+
`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ALTER TABLE builds
2+
ALTER COLUMN build_deploy_id SET DATA TYPE BIGINT,
3+
ALTER COLUMN build_deploy_id SET NOT NULL,
4+
ALTER COLUMN build_deploy_id SET DEFAULT 0;

0 commit comments

Comments
 (0)