git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_SGD/tags/3.7.0.2_original@1 eb19766c-00d9-a042-a3a0-45cb8ec72764
25 lines
763 B
SQL
25 lines
763 B
SQL
SET FOREIGN_KEY_CHECKS=0;
|
|
|
|
DROP TABLE IF EXISTS `document_role_allocations`;
|
|
CREATE TABLE `document_role_allocations` (
|
|
`id` int(11) NOT NULL default '0',
|
|
`document_id` int(11) NOT NULL default '0',
|
|
`role_id` int(11) NOT NULL default '0',
|
|
`permission_descriptor_id` int(11) NOT NULL default '0',
|
|
UNIQUE KEY `id` (`id`),
|
|
KEY `document_id` (`document_id`)
|
|
) TYPE=InnoDB ;
|
|
|
|
DROP TABLE IF EXISTS `zseq_document_role_allocations`;
|
|
CREATE TABLE `zseq_document_role_allocations` (
|
|
`id` int(10) unsigned NOT NULL auto_increment,
|
|
PRIMARY KEY (`id`)
|
|
) TYPE=MyISAM ;
|
|
|
|
INSERT INTO `roles` VALUES (-1, 'Owner');
|
|
ALTER TABLE `documents` ADD `owner_id` int(11) NOT NULL default '0';
|
|
UPDATE `documents` SET `owner_id` = `creator_id`;
|
|
|
|
|
|
SET FOREIGN_KEY_CHECKS=1;
|