patch uuid generator into migrations

This commit is contained in:
ntr
2019-09-23 14:11:40 +10:00
parent 8992fed591
commit f6ff6d37e3
2 changed files with 4 additions and 69 deletions
@@ -2,6 +2,10 @@ const uuidv4 = require('uuid/v4');
// give everybody the shapes mtx
exports.up = async knex => {
await knex.raw(`
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
`);
await knex.raw(`
INSERT INTO mtx (id, account, variant)
SELECT uuid_generate_v4() as id, id as account, 'Shapes'