aboutsummaryrefslogtreecommitdiffstats
path: root/db/normalized/users.js
blob: 2c2004c0a445a041562740737d8e88425a86b764 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
exports.up = function(knex) {
  return knex.schema.createTable('users', function(t) {
    t.increments('id').unsigned().primary();

    t.string('uuid').notNull().index();
    t.string('username').notNull().index();
    t.string('password').notNull();
    t.string('email').nullable().index();
    t.string('phone').nullable();
    t.enum('access', ['Anonymous', 'Registered', 'Admin']).notNull().defaultTo('Anonymous');

    t.timestamps();
  })
};

exports.down = function(knex) {
  return knex.schema.dropTable('users');
};
"p">.make(); } const count = qr.getModuleCount(); const size = count + margin * 2; let path = ''; for (let r = 0; r < count; r++) { for (let c = 0; c < count; c++) { if (qr.isDark(r, c)) { path += `M${c + margin},${r + margin}h1v1h-1z`; } } } const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${size} ${size}" shape-rendering="crispEdges" class="qr"> <rect width="${size}" height="${size}" fill="#fff"/> <path d="${path}" fill="#111"/> </svg>`; _memo.set(key, svg); if (_memo.size > 24) _memo.delete(_memo.keys().next().value); return svg; }