mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
e2ad0cae45
This PR changes how we calculate average time to production. Instead of calculating fleeting 30 day windows and calculating the past and current window, we now calculate a flat average across the entire project life. This is less error prone as each feature will be tied to the earliest time it was turned on in a production environment.
20 lines
392 B
JavaScript
20 lines
392 B
JavaScript
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER table project_stats
|
|
DROP COLUMN avg_time_to_prod_past_window
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER table project_stats
|
|
ADD COLUMN IF NOT EXISTS avg_time_to_prod_past_window INTEGER DEFAULT 0
|
|
`,
|
|
cb,
|
|
);
|
|
};
|