ALTER TABLE plugins ADD CONSTRAINT uniq_name UNIQUE(\\`name\\`);
INSERT into plugins (\\`name\\`,\\`active\\`) VALUES ('Authwebserver','1') ON DUPLICATE KEY UPDATE active=1;
ALTER TABLE plugins DROP INDEX uniq_name;
ALTER TABLE plugin_settings ADD CONSTRAINT uniq_plugin UNIQUE (\\`plugin_id\\`,\\`key\\`);
INSERT INTO plugin_settings (\\`plugin_id\\`,\\`key\\`,\\`value\\`) VALUES ((SELECT id from plugins where name='Authwebserver'),'strip_domain', NULL) ON DUPLICATE KEY update value=NULL;
INSERT INTO plugin_settings (\\`plugin_id\\`,\\`key\\`,\\`value\\`) VALUES ((SELECT id from plugins where name='Authwebserver'),'serverkey', '"REMOTE_USER"') ON DUPLICATE KEY update value='"REMOTE_USER"';
ALTER TABLE plugin_settings DROP INDEX uniq_plugin;