mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
c4b697b57d
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
20 lines
511 B
JavaScript
20 lines
511 B
JavaScript
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE api_tokens ADD COLUMN project VARCHAR REFERENCES PROJECTS(id) ON DELETE CASCADE;;
|
|
ALTER TABLE api_tokens ADD COLUMN environment VARCHAR REFERENCES environments(name) ON DELETE CASCADE;;
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE api_tokens DROP COLUMN project;
|
|
ALTER TABLE api_tokens DROP COLUMN environment;
|
|
`,
|
|
cb,
|
|
);
|
|
};
|