mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
6f075e4d1c
* feat: add migration for currentTime context field * feat: add tests for number validator * feat: add validation fields for constraint * feat: add validation for semver, date and legalvalues * fix: import paths * fix: only allow specified operators * fix: add operator test * fix: reset db * fix: remove unused import * fix: set semver as dependency
20 lines
395 B
JavaScript
20 lines
395 B
JavaScript
'use strict';
|
|
|
|
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
INSERT INTO context_fields(name, description, sort_order) VALUES('currentTime', 'Allows you to constrain on date values', 3);
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
DELETE FROM context_fields WHERE name = 'currentTime';
|
|
`,
|
|
cb,
|
|
);
|
|
};
|