mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
a8ea8d3fbe
This PR addresses some cleanup related to removing the useLastSeenRefactor flag: * Added fallback last seen to the feature table last_seen_at column * Remove foreign key on environment since we can not guarantee that we will get valid data in this field * Add environments to cleanup function * Add test for cleanup environments
17 lines
389 B
JavaScript
17 lines
389 B
JavaScript
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE last_seen_at_metrics DROP CONSTRAINT last_seen_at_metrics_environment_fkey;
|
|
`,
|
|
cb
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE last_seen_at_metrics ADD CONSTRAINT last_seen_at_metrics_environment_fkey FOREIGN KEY (environment) REFERENCES environments(name);
|
|
`,
|
|
cb
|
|
);
|
|
}; |