mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	* fix: move user preferences dashboard and twofactor out of users table This allows them to work with any authentication method Add set_user_pref() and get_user_pref() helper functions * fix edit users for other users * Fix updated_at default timestamp * Update and rename 183.sql to 184.sql * removed commented out debug
		
			
				
	
	
		
			6 lines
		
	
	
		
			413 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
			
		
		
	
	
			6 lines
		
	
	
		
			413 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
| ALTER TABLE users_prefs DROP PRIMARY KEY;
 | |
| ALTER TABLE users_prefs DROP INDEX pref;
 | |
| INSERT INTO `users_prefs` (`user_id`, `pref`, `value`) SELECT `user_id`, 'dashboard', `dashboard` FROM `users` WHERE `dashboard` != '0';
 | |
| INSERT INTO `users_prefs` (`user_id`, `pref`, `value`) SELECT `user_id`, 'twofactor', `twofactor` FROM `users` WHERE `twofactor` != '0';
 | |
| ALTER TABLE `users` DROP `twofactor`, DROP `dashboard`;
 |