Commit 2ea484f974ffec3e18daebcd4e3d85b47738d048

Authored by Neil Blakey-Milner
1 parent e63c202d

Add an upgrade script to add authentication sources and the related user

bits to the database.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4219 c91229c3-7414-0410-bfa2-8a42b809f60b
sql/mysql/upgrade/2.99.3/authentication_sources.sql 0 → 100644
  1 +SET FOREIGN_KEY_CHECKS=0;
  2 +
  3 +ALTER TABLE `users` ADD COLUMN `authentication_details` varchar(255) default NULL;
  4 +ALTER TABLE `users` ADD COLUMN `authentication_source_id` int(11) default NULL;
  5 +ALTER TABLE `users` ADD INDEX `authentication_source` (`authentication_source_id`);
  6 +ALTER TABLE `users` ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`authentication_source_id`) REFERENCES `authentication_sources` (`id`) ON DELETE SET NULL;
  7 +
  8 +CREATE TABLE `authentication_sources` (
  9 + `id` int(11) NOT NULL default '0',
  10 + `name` varchar(50) NOT NULL default '',
  11 + `namespace` varchar(255) NOT NULL default '',
  12 + `authentication_provider` varchar(255) NOT NULL default '',
  13 + `config` text NOT NULL,
  14 + `is_user_source` tinyint(1) NOT NULL default '0',
  15 + `is_group_source` tinyint(1) NOT NULL default '0',
  16 + PRIMARY KEY (`id`),
  17 + KEY `namespace` (`namespace`)
  18 +) ENGINE=InnoDB;
  19 +
  20 +CREATE TABLE `zseq_authentication_sources` (
  21 + `id` int(10) unsigned NOT NULL auto_increment,
  22 + PRIMARY KEY (`id`)
  23 +) ENGINE=MyISAM;
  24 +
  25 +SET FOREIGN_KEY_CHECKS=1;