| 
					
				 | 
			
			
				@@ -5,6 +5,7 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // ===================================== 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // ASSETS ------------------------------ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('assets', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('filename').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('basename').notNullable() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -18,6 +19,7 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // ASSET FOLDERS ----------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('assetFolders', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('name').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('slug').notNullable() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -25,6 +27,7 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // AUTHENTICATION ---------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('authentication', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('key').notNullable().primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.boolean('isEnabled').notNullable().defaultTo(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.json('config').notNullable() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -34,6 +37,7 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // COMMENTS ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('comments', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.text('content').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('createdAt').notNullable() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -41,12 +45,14 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // EDITORS ----------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('editors', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('key').notNullable().primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.boolean('isEnabled').notNullable().defaultTo(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.json('config').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // GROUPS ------------------------------ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('groups', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('name').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('createdAt').notNullable() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -54,6 +60,7 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // LOCALES ----------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('locales', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('code', 2).notNullable().primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.json('strings') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.boolean('isRTL').notNullable().defaultTo(false) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -64,6 +71,7 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // LOGGING ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('loggers', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('key').notNullable().primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.boolean('isEnabled').notNullable().defaultTo(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('level').notNullable().defaultTo('warn') 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -71,8 +79,10 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // PAGE HISTORY ------------------------ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('pageHistory', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('path').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.string('hash').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('title').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('description') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.boolean('isPrivate').notNullable().defaultTo(false) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -85,8 +95,10 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // PAGES ------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('pages', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('path').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.string('hash').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('title').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('description') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.boolean('isPrivate').notNullable().defaultTo(false) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -102,24 +114,28 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // RENDERERS --------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('renderers', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('key').notNullable().primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.boolean('isEnabled').notNullable().defaultTo(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.json('config') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // SEARCH ------------------------------ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('searchEngines', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('key').notNullable().primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.boolean('isEnabled').notNullable().defaultTo(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.json('config') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // SETTINGS ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('settings', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('key').notNullable().primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.json('value') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('updatedAt').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // STORAGE ----------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('storage', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('key').notNullable().primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.boolean('isEnabled').notNullable().defaultTo(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('mode', ['sync', 'push', 'pull']).notNullable().defaultTo('push') 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -127,6 +143,7 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // TAGS -------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('tags', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('tag').notNullable().unique() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('title') 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -135,6 +152,7 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // USERS ------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('users', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('email').notNullable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.string('name').notNullable() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -155,18 +173,21 @@ exports.up = knex => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // ===================================== 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // PAGE HISTORY TAGS --------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('pageHistoryTags', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.integer('pageId').unsigned().references('id').inTable('pageHistory').onDelete('CASCADE') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.integer('tagId').unsigned().references('id').inTable('tags').onDelete('CASCADE') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // PAGE TAGS --------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('pageTags', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.integer('pageId').unsigned().references('id').inTable('pages').onDelete('CASCADE') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.integer('tagId').unsigned().references('id').inTable('tags').onDelete('CASCADE') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // USER GROUPS ------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .createTable('userGroups', table => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      table.charset('utf8mb4') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.increments('id').primary() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.integer('userId').unsigned().references('id').inTable('users').onDelete('CASCADE') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       table.integer('groupId').unsigned().references('id').inTable('groups').onDelete('CASCADE') 
			 |