add index for note's type + some fixes

This commit is contained in:
azivner 2018-05-21 20:12:46 -04:00
parent e8d089e37e
commit 9fa6c0918c
6 changed files with 18 additions and 3 deletions

View File

@ -0,0 +1,2 @@
create index IDX_notes_type
on notes (type);

View File

@ -337,3 +337,14 @@ div.ui-tooltip {
.child-overview a { .child-overview a {
color: #444; color: #444;
} }
#sql-console-query {
height: 150px;
width: 100%;
border: 1px solid #ccc;
margin-bottom: 10px;
}
#sql-console-query .CodeMirror {
height: 150px;
}

View File

@ -3,7 +3,7 @@
const build = require('./build'); const build = require('./build');
const packageJson = require('../../package'); const packageJson = require('../../package');
const APP_DB_VERSION = 91; const APP_DB_VERSION = 92;
module.exports = { module.exports = {
appVersion: packageJson.version, appVersion: packageJson.version,

View File

@ -3,6 +3,7 @@
const sql = require('./sql'); const sql = require('./sql');
const sqlInit = require('./sql_init'); const sqlInit = require('./sql_init');
const log = require('./log'); const log = require('./log');
const utils = require('./utils');
const messagingService = require('./messaging'); const messagingService = require('./messaging');
const syncMutexService = require('./sync_mutex'); const syncMutexService = require('./sync_mutex');
const cls = require('./cls'); const cls = require('./cls');

View File

@ -212,7 +212,8 @@ const primaryKeys = {
"images": "imageId", "images": "imageId",
"note_images": "noteImageId", "note_images": "noteImageId",
"labels": "labelId", "labels": "labelId",
"api_tokens": "apiTokenId" "api_tokens": "apiTokenId",
"options": "name"
}; };
async function getEntityRow(entityName, entityId) { async function getEntityRow(entityName, entityId) {

View File

@ -424,7 +424,7 @@
</div> </div>
<div id="sql-console-dialog" title="SQL console" style="display: none; padding: 20px;"> <div id="sql-console-dialog" title="SQL console" style="display: none; padding: 20px;">
<div style="height: 150px; width: 100%; border: 1px solid #ccc; margin-bottom: 10px;" id="sql-console-query"></div> <div id="sql-console-query"></div>
<div style="text-align: center"> <div style="text-align: center">
<button class="btn btn-danger" id="sql-console-execute">Execute <kbd>CTRL+ENTER</kbd></button> <button class="btn btn-danger" id="sql-console-execute">Execute <kbd>CTRL+ENTER</kbd></button>