1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/src/migrations/20210218090213-generate-server-identifier.js
Christopher Kolstad b83387a84a
Add a version service (#729)
- Checks versions against https://version.unleash.run
- Generates a unique instance id (uuid)
2021-02-19 11:13:25 +01:00

20 lines
356 B
JavaScript

'use strict';
exports.up = function(db, cb) {
db.runSql(
`
INSERT INTO settings(name, content) VALUES ('instanceInfo', json_build_object('id', gen_random_uuid()));
`,
cb,
);
};
exports.down = function(db, cb) {
db.runSql(
`
DROP FROM settings WHERE name = 'instanceInfo'
`,
cb,
);
};