mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	remove all other foreign keys from synced entities
This commit is contained in:
		
							parent
							
								
									111d92bd81
								
							
						
					
					
						commit
						57c4465a37
					
				
							
								
								
									
										34
									
								
								migrations/0060__remove_rest_of_foreign_keys.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								migrations/0060__remove_rest_of_foreign_keys.sql
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					CREATE TABLE IF NOT EXISTS "notes_history_mig" (
 | 
				
			||||||
 | 
					  `note_history_id`	TEXT NOT NULL PRIMARY KEY,
 | 
				
			||||||
 | 
					  `note_id`	TEXT NOT NULL,
 | 
				
			||||||
 | 
					  `note_title`	TEXT,
 | 
				
			||||||
 | 
					  `note_text`	TEXT,
 | 
				
			||||||
 | 
					  `is_protected`	INT NOT NULL DEFAULT 0,
 | 
				
			||||||
 | 
					  `date_modified_from` TEXT NOT NULL,
 | 
				
			||||||
 | 
					  `date_modified_to` TEXT NOT NULL
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to)
 | 
				
			||||||
 | 
					  SELECT note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to FROM notes_history;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DROP TABLE notes_history;
 | 
				
			||||||
 | 
					ALTER TABLE notes_history_mig RENAME TO notes_history;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` (
 | 
				
			||||||
 | 
					  `note_id`
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` (
 | 
				
			||||||
 | 
					  `date_modified_from`
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` (
 | 
				
			||||||
 | 
					  `date_modified_to`
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DROP TABLE recent_notes;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CREATE TABLE `recent_notes` (
 | 
				
			||||||
 | 
					  `note_tree_id` TEXT NOT NULL PRIMARY KEY,
 | 
				
			||||||
 | 
					  `note_path` TEXT NOT NULL,
 | 
				
			||||||
 | 
					  `date_accessed` TEXT NOT NULL,
 | 
				
			||||||
 | 
					  is_deleted INT
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
@ -3,7 +3,7 @@
 | 
				
			|||||||
const build = require('./build');
 | 
					const build = require('./build');
 | 
				
			||||||
const packageJson = require('../package');
 | 
					const packageJson = require('../package');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const APP_DB_VERSION = 59;
 | 
					const APP_DB_VERSION = 60;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
    app_version: packageJson.version,
 | 
					    app_version: packageJson.version,
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +1 @@
 | 
				
			|||||||
module.exports = { build_date:"2017-12-20T22:31:56-05:00", build_revision: "66652f2f0c57d5511781901ff6e62dc6d9591c83" };
 | 
					module.exports = { build_date:"2017-12-20T22:39:26-05:00", build_revision: "111d92bd81c23653ad4fa13b868611449aed8329" };
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user