1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
unleash.unleash/src/migrations/20220224111626-add-current-time-context-field.js
Fredrik Strand Oseberg 6f075e4d1c
Feat/new constraint operators (#1397)
* 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
2022-03-04 17:29:42 +01:00

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,
);
};