mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	removed ID from options, opt_name is now new primary key
This commit is contained in:
		
							
								
								
									
										11
									
								
								migrations/0024__remove_id_from_options.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								migrations/0024__remove_id_from_options.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
CREATE TABLE `options_mig` (
 | 
			
		||||
	`opt_name`	TEXT NOT NULL PRIMARY KEY,
 | 
			
		||||
	`opt_value`	TEXT,
 | 
			
		||||
	`date_modified` INT
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO options_mig (opt_name, opt_value, date_modified)
 | 
			
		||||
    SELECT opt_name, opt_value, date_modified FROM options;
 | 
			
		||||
 | 
			
		||||
DROP TABLE options;
 | 
			
		||||
ALTER TABLE options_mig RENAME TO options;
 | 
			
		||||
@@ -4,7 +4,7 @@ const options = require('./options');
 | 
			
		||||
const fs = require('fs-extra');
 | 
			
		||||
const log = require('./log');
 | 
			
		||||
 | 
			
		||||
const APP_DB_VERSION = 23;
 | 
			
		||||
const APP_DB_VERSION = 24;
 | 
			
		||||
const MIGRATIONS_DIR = "./migrations";
 | 
			
		||||
 | 
			
		||||
async function migrate() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user