mirror of https://github.com/harness/drone.git
parent
3e7ecf1615
commit
4f85961434
|
@ -200,6 +200,10 @@ var migrations = []struct {
|
||||||
name: "create-new-table-cards",
|
name: "create-new-table-cards",
|
||||||
stmt: createNewTableCards,
|
stmt: createNewTableCards,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "alter-table-builds-alter-column-deploy-id",
|
||||||
|
stmt: alterTableBuildsAlterColumnDeployId,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Migrate performs the database migration. If the migration fails
|
// 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
|
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;
|
||||||
|
`
|
||||||
|
|
|
@ -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;
|
Loading…
Reference in New Issue