Configuration split to lists, send configurations and server config.

This is before testing.
This commit is contained in:
Tomas Bures 2018-04-22 17:33:43 +02:00
parent 4fce4b6f81
commit c12efeb97f
40 changed files with 819 additions and 311 deletions

View file

@ -1,3 +1,5 @@
const {getGlobalNamespaceId} = require('../../../shared/namespaces');
exports.up = (knex, Promise) => (async() => {
const entityTypesAddNamespace = ['list', 'custom_form', 'template', 'campaign', 'report', 'report_template', 'user'];
await knex.schema.createTable('namespaces', table => {
@ -8,7 +10,7 @@ exports.up = (knex, Promise) => (async() => {
});
await knex('namespaces').insert({
id: 1, /* Global namespace id */
id: getGlobalNamespaceId(),
name: 'Root',
description: 'Root namespace'
});
@ -19,7 +21,7 @@ exports.up = (knex, Promise) => (async() => {
});
await knex(`${entityType}s`).update({
namespace: 1 /* Global namespace id */
namespace: getGlobalNamespaceId()
});
await knex.schema.table(`${entityType}s`, table => {