mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
7ead887147
* fix: Does not delete api_tokens on drop-Import * feat: Cleans unused apiTokens on environment import * refactor: Moves ALL_PROJECTS and ALL_ENVIRONMENTS to constants * refactor: Renames migration 20220528143630 for a more precise name * refactor: Removes unecessary console.log * fix: Adds correct down-script for migration 20220528143630
20 lines
424 B
JavaScript
20 lines
424 B
JavaScript
'use strict';
|
|
|
|
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE api_tokens DROP CONSTRAINT api_tokens_environment_fkey;
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE api_tokens ADD CONSTRAINT api_tokens_environment_fkey FOREIGN KEY(environment) REFERENCES environments(name) ON DELETE CASCADE;
|
|
`,
|
|
cb,
|
|
);
|
|
};
|