Just playing around with 3.3 using a clean database, but I can't seem to change profile when I create a new user? The only option is "Administrator" and no profiles appear on the "team" page. I checked in MySQL and the other default profiles are correctly listed in the user_profiles table, they just don't seem to exist in XPWeb. Is there some new config setting I have to change?
Just thought I'd ask in case it's a bug ;)
Michael.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Strange... Did you just install the db and tried to create a user? Because there is a way to have this situation, but that would mean you'd change the current user's profile so that he cannot see profiles ("sections" / "User profiles" => "no"), and he cannot change a user's profile ("change user profile" => "no")
I suppose you haven't done that?
So... if you just installed this new version and tried to create a new user, without any changes to profiles, then this is a bug!
I cannot get this situation so you'll have to help me a little bit.
- any php errors? (remember to set error_reporting = E_ALL in php.ini)
- any javascript error?
- you said you cannot change the profile... is the drop down list greyed or is the list white, but with only one choice available?
- there aren't any profiles displayed, or no other profiles than "Admin"?
- any other strange thing...
Thanks!
Olivier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) Completely removed old xpweb 3.2.1 installation, including the database
2) Install xpweb 3.3 to the following directory (on Windows):
c:\simplephp\root\xpweb
ie. the main xpweb files eg. team.php are in this folder.
3) copy across my old config_local.inc.php file. The only thing it changes is the root password.
4) check that I can see the config_test page OK
5) load the index.php file (it works, but I get the following PHP error:
[Mon Feb 27 14:36:21 2006] [error] [client 127.0.0.1] File does not exist: C:/SimplePHP/root/View
6) init the database. The database gets created, (but it then tells me it's an older version and I have to update it). No JavaScript errors, but lots of PHP errors, all pretty much the same, like this one:
[Mon Feb 27 14:37:07 2006] [error] [client 127.0.0.1] SQL ERROR:<br/>\r\n\t\t\t\t\t\tINSERT INTO\tprofiles_rights (profile_id, protected_section_id, right_type_id)\r\n\t\t\t\t\t\tSELECT\t\t(SELECT MAX(id) FROM user_profiles) as profileId, protected_sections.id as protectedId, right_types.id as rightId\r\n\t\t\t\t\t\tFROM\t\tprotected_sections, right_types\r\n\t\t\t\t\t\tWHERE\t\tprotected_sections.name1 = 'section'\r\n\t\t\t\t\t\tAND\t\tprotected_sections.name2 = 'index'\r\n\t\t\t\t\t\tAND\t\tright_types.type_name = 'all'<br/>You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT MAX(id) FROM user_profiles) as profileId, protected_sect, referer: http://localhost:8080/xpweb/index.php
7) then, I can log in as Admin (root) and create a user, but on the "team" page, there is no "user profiles" section at all. When creating a team member, there's only one option in the drop-down, which is administrator.
Sorry about the long post! Hope this helps,
Michael.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I like long posts!
At least I get the information...
Ok, so everything comes from the php errors... Which I don't get when installing on my mysql 5. Do you run version 5?
When trying to execute this, it worked:
INSERT INTO profiles_rights (profile_id,
protected_section_id, right_type_id) SELECT (SELECT MAX(id)
FROM user_profiles) as profileId, protected_sections.id as protectedId,
right_types.id as rightId FROM protected_sections,
right_types WHERE protected_sections.name1
= 'section' AND protected_sections.name2 =
'index' AND right_types.type_name = 'all'
... I'm wondering if this syntax isn't supported by your mysql?
I might split the request into two requests...
Olivier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I don't get the error but I see where it can come from. I made some changes for Postgresql and it seems your MySql doesn't like it.
I fixed it.
I'll post a new version soon, but in the meantime, please execute the following SQL (after you dropped and recreated your db) and you should be fine to play with XPWeb v3.3...
-- Update From 0
CREATE TABLE projects ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', description longtext NOT NULL, PRIMARY KEY (id) );
CREATE TABLE team_members ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', description longtext NOT NULL, PRIMARY KEY (id) );
CREATE TABLE projects_affectation ( project_id tinyint(4) NOT NULL default '0', team_member_id tinyint(4) NOT NULL default '0', PRIMARY KEY (project_id,team_member_id) );
CREATE TABLE metaphor_words ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', description longtext NOT NULL, project_id tinyint(4) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE project_link_types ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', PRIMARY KEY (id) );
CREATE TABLE project_links ( id tinyint(4) NOT NULL auto_increment, url varchar(255) NOT NULL default '', comment varchar(255) NOT NULL default '', project_id tinyint(4) NOT NULL default '0', type tinyint(4) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE web_categories ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', project_id tinyint(4) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE web_links ( id tinyint(4) NOT NULL auto_increment, url varchar(255) NOT NULL default '', name varchar(255) NOT NULL default '', description longtext NOT NULL, category_id tinyint(4) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE iterations ( id tinyint(4) NOT NULL auto_increment, project_id tinyint(4) NOT NULL default '0', name varchar(255) NOT NULL default '', description longtext NOT NULL, date date NOT NULL default '0000-00-00', PRIMARY KEY (id) );
CREATE TABLE stories ( id tinyint(4) NOT NULL auto_increment, iteration_id tinyint(4) NOT NULL default '0', project_id tinyint(4) NOT NULL default '0', name varchar(255) NOT NULL default '', description longtext NOT NULL, validation_criteria longtext NOT NULL, priority tinyint(2) NOT NULL default '0', risk tinyint(2) NOT NULL default '0', weight tinyint(2) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE tasks ( id tinyint(4) NOT NULL auto_increment, story_id tinyint(4) NOT NULL default '0', iteration_id tinyint(4) NOT NULL default '0', project_id tinyint(4) NOT NULL default '0', responsible_team_member_id tinyint(4) NOT NULL default '0', name varchar(255) NOT NULL default '', description longtext NOT NULL, start_date date NOT NULL default '0000-00-00', completion tinyint(2) NOT NULL default '0', weight tinyint(2) NOT NULL default '0', PRIMARY KEY (id) );
INSERT INTO project_link_types VALUES (1, 'modeling');
INSERT INTO project_link_types VALUES (2, 'test');
INSERT INTO project_link_types VALUES (3, 'doc');
INSERT INTO project_link_types VALUES (4, 'cvs');
INSERT INTO project_link_types VALUES (5, 'directory');
INSERT INTO project_link_types VALUES (6, 'javadoc');
-- Update From 1 (1)
CREATE TABLE tbl_users( username varchar(40) PRIMARY KEY, password varchar(60) NOT NULL, email varchar(40) NOT NULL, question varchar(200), answer varchar(30), lastlogin integer );
CREATE TABLE tbl_log( timestamp integer NOT NULL, ip varchar(16) NOT NULL DEFAULT 'no ip logged' , username varchar(40), action varchar(40), PRIMARY KEY(timestamp, ip) );
CREATE TABLE tbl_banned( ip varchar(16) PRIMARY KEY );
CREATE TABLE tbl_tries( username varchar(40) PRIMARY KEY, tries int, nextlogin int );
CREATE TABLE tbl_group( username varchar(40) PRIMARY KEY, gid int );
insert into tbl_group select username, 0 from tbl_users;
CREATE TABLE user_profiles ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', description longtext NOT NULL, PRIMARY KEY (id) );
CREATE TABLE protected_sections ( id tinyint(4) NOT NULL auto_increment, name1 varchar(100) NOT NULL default '', name2 varchar(100) NOT NULL default '', PRIMARY KEY (id) );
CREATE TABLE right_types ( id tinyint(4) NOT NULL auto_increment, type_name varchar(100) NOT NULL default '', PRIMARY KEY (id) );
CREATE TABLE available_section_rights ( protected_section_id tinyint(4) NOT NULL default '0', right_type_id tinyint(4) NOT NULL default '0', PRIMARY KEY (protected_section_id, right_type_id) );
CREATE TABLE profiles_rights ( profile_id tinyint(4) NOT NULL default '0', protected_section_id tinyint(4) NOT NULL default '0', right_type_id tinyint(4) NOT NULL default '0', PRIMARY KEY (profile_id, protected_section_id) );
INSERT INTO right_types (type_name) VALUES ('no');
INSERT INTO right_types (type_name) VALUES ('all');
INSERT INTO right_types (type_name) VALUES ('proj');
INSERT INTO right_types (type_name) VALUES ('me');
INSERT INTO right_types (type_name) VALUES ('my');
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'index');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Projects');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Team');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'UserProfiles');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Planning');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'UserConfig');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'AdminConfig');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Metaphor');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Doc');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name IN ('all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Tests');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'CVS');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Links');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('project' ,'select');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('project' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('project' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('project' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('projectLink' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('projectLink' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('projectLink' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('profile' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('profile' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('profile' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'affect');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'changePass');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'changeProfile');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('iteration' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('iteration' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('iteration' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('story' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('story' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('story' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('task' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('task' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('task' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('metaphorWord' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('metaphorWord' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('metaphorWord' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webLink' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webLink' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webLink' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webCategory' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webCategory' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webCategory' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO user_profiles (name, description) VALUES ('Anonymous' ,'Access without logging in');
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO user_profiles (name, description) VALUES ('Admin' ,'Access with admin login');
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO user_profiles (name, description) VALUES ('Developer' ,'Member of the developing team');
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'me';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name = 'me';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'my';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'my';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'my';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO user_profiles (name, description) VALUES ('Coach' ,'Team coach');
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
ALTER TABLE team_members ADD profile_id INT DEFAULT '0' NOT NULL AFTER id;
CREATE TABLE working_days ( setup_name VARCHAR( 11 ) DEFAULT '-1' NOT NULL , Mon TINYINT( 1 ) DEFAULT '1' , Tue TINYINT( 1 ) DEFAULT '1' , Wed TINYINT( 1 ) DEFAULT '1' , Thu TINYINT( 1 ) DEFAULT '1' , Fri TINYINT( 1 ) DEFAULT '1' , Sat TINYINT( 1 ) DEFAULT '0' , Sun TINYINT( 1 ) DEFAULT '0', PRIMARY KEY ( setup_name ));
INSERT INTO working_days (setup_name ,Mon ,Tue ,Wed ,Thu ,Fri ,Sat ,Sun ) VALUES ( 'ite_0' ,'1' ,'1' ,'1' ,'1' ,'1' ,'0' ,'0' );
ALTER TABLE iterations ADD working_days_name VARCHAR( 11 ) DEFAULT '-1' NOT NULL AFTER project_id;
ALTER TABLE tasks ADD working_days_name VARCHAR( 11 ) DEFAULT 'ite_0' NOT NULL AFTER responsible_team_member_id;
ALTER TABLE web_categories ADD description LONGTEXT AFTER name;
ALTER TABLE iterations ADD load_factor FLOAT DEFAULT '1.6' NOT NULL AFTER working_days_name;
-- Update From 2 (1)
ALTER TABLE `projects` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `team_members` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `projects_affectation` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `projects_affectation` CHANGE `team_member_id` `team_member_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `metaphor_words` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `metaphor_words` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `project_links` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `project_links` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `web_categories` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `web_categories` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `web_links` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `web_links` CHANGE `category_id` `category_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `iterations` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `iterations` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `stories` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `stories` CHANGE `iteration_id` `iteration_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `stories` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `tasks` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `tasks` CHANGE `story_id` `story_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `tasks` CHANGE `iteration_id` `iteration_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `tasks` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `tasks` CHANGE `responsible_team_member_id` `responsible_team_member_id` INT UNSIGNED NOT NULL DEFAULT "0";
-- Update From 2.1 (1)
ALTER TABLE tasks ADD done FLOAT DEFAULT '0' NOT NULL AFTER weight;
ALTER TABLE tasks ADD todo FLOAT DEFAULT '0' NOT NULL AFTER done;
ALTER TABLE tasks ADD end_date DATE DEFAULT '1969-01-01' NOT NULL AFTER todo;
ALTER TABLE tasks ADD theory_end_comp FLOAT DEFAULT '-1' NOT NULL AFTER end_date;
CREATE TABLE version_info (version_no FLOAT NOT NULL ,PRIMARY KEY ( version_no ));
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Reports');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Reports' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE protected_sections.name1 = "section" AND protected_sections.name2 = "Reports" AND right_types.type_name = "all";
UPDATE tasks SET done = ((completion*weight)/100)*1.6, todo = ((100-completion)*weight)/100 WHERE iteration_id = 0;
UPDATE tasks SET todo=-1 where completion <> 100 and todo = 0;
UPDATE tasks SET done=1 where done< 0;
ALTER TABLE tasks DROP completion;
ALTER TABLE tasks CHANGE weight weight FLOAT DEFAULT -1 NOT NULL;
-- Update From 2.2 (1)
-- Update From 2.3 (1)
ALTER TABLE version_info CHANGE version_no version_no VARCHAR(10) DEFAULT '0' NOT NULL;
-- Update From 2.3.1 (1)
ALTER TABLE tasks ADD auto INT DEFAULT '1' NOT NULL AFTER end_date;
-- Update From 2.4 (1)
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'XPCalendar');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'XPCalendar' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE protected_sections.name1 = "section" AND protected_sections.name2 = "XPCalendar" AND right_types.type_name = "all";
-- Update From 2.5 (1)
ALTER TABLE `available_section_rights` CHANGE `protected_section_id` `protected_section_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `available_section_rights` CHANGE `right_type_id` `right_type_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `profiles_rights` CHANGE `profile_id` `profile_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `profiles_rights` CHANGE `protected_section_id` `protected_section_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `profiles_rights` CHANGE `right_type_id` `right_type_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `project_link_types` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `project_links` CHANGE `type` `type` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `protected_sections` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `right_types` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `team_members` CHANGE `profile_id` `profile_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `user_profiles` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
-- Update From 2.5.1 (1) => nothing to do
-- Update From 2.5.2 (1)
DELETE FROM available_section_rights;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name IN ('all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Reports' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'XPCalendar' AND right_types.type_name IN ('no', 'all', 'proj') ;
-- Update From 3.0 (1)
ALTER TABLE team_members ADD CONSTRAINT FOREIGN KEY ( profile_id ) REFERENCES user_profiles( id );
ALTER TABLE iterations ADD CONSTRAINT FOREIGN KEY ( working_days_name ) REFERENCES working_days( setup_name );
ALTER TABLE tasks ADD CONSTRAINT FOREIGN KEY ( working_days_name ) REFERENCES working_days( setup_name );
ALTER TABLE projects_affectation ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects ( id ), ADD CONSTRAINT FOREIGN KEY ( team_member_id ) REFERENCES team_members( id ) ;
ALTER TABLE metaphor_words ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE project_links ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id ), ADD CONSTRAINT FOREIGN KEY ( type ) REFERENCES project_link_types( id ) ;
ALTER TABLE web_categories ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE web_links ADD CONSTRAINT FOREIGN KEY ( category_id ) REFERENCES web_categories( id ) ;
ALTER TABLE iterations ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE stories ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE tasks ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE available_section_rights ADD CONSTRAINT FOREIGN KEY ( protected_section_id ) REFERENCES protected_sections( id ), ADD CONSTRAINT FOREIGN KEY ( right_type_id ) REFERENCES right_types( id );
ALTER TABLE profiles_rights ADD CONSTRAINT FOREIGN KEY ( profile_id ) REFERENCES user_profiles( id ), ADD CONSTRAINT FOREIGN KEY ( protected_section_id ) REFERENCES protected_sections( id ), ADD CONSTRAINT FOREIGN KEY ( right_type_id ) REFERENCES right_types( id );
-- Update From 3.0.1 (1)
ALTER TABLE `iterations` CHANGE `working_days_name` `working_days_name` VARCHAR( 11 ) DEFAULT "ite_0" NOT NULL ;
-- Update From 3.1 (1)
ALTER TABLE `tasks` ADD `pair_team_member_id` INT DEFAULT "0" NOT NULL AFTER responsible_team_member_id;
-- Update From 3.2 or 3.2.1 (1)
-- Time to set version in DB (1) : 3.3
DELETE FROM version_info;
INSERT INTO version_info VALUES("3.3");
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yesterday I enjoyed the power of Unix on my MacOSX and wrote a bash script that will package the XPWeb and readme files, zip and gzip it, and finally upload it to sourceforge... releases should be more frequent now!
Don't ask me why I'm doing this... I don't know the answer ;-)
Maybe for such messages... :o) thanks!
Olivier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Olivier,
Thanks for the new version!
Just playing around with 3.3 using a clean database, but I can't seem to change profile when I create a new user? The only option is "Administrator" and no profiles appear on the "team" page. I checked in MySQL and the other default profiles are correctly listed in the user_profiles table, they just don't seem to exist in XPWeb. Is there some new config setting I have to change?
Just thought I'd ask in case it's a bug ;)
Michael.
Hi Michael.
Strange... Did you just install the db and tried to create a user? Because there is a way to have this situation, but that would mean you'd change the current user's profile so that he cannot see profiles ("sections" / "User profiles" => "no"), and he cannot change a user's profile ("change user profile" => "no")
I suppose you haven't done that?
So... if you just installed this new version and tried to create a new user, without any changes to profiles, then this is a bug!
I cannot get this situation so you'll have to help me a little bit.
- any php errors? (remember to set error_reporting = E_ALL in php.ini)
- any javascript error?
- you said you cannot change the profile... is the drop down list greyed or is the list white, but with only one choice available?
- there aren't any profiles displayed, or no other profiles than "Admin"?
- any other strange thing...
Thanks!
Olivier
Hi Olivier,
Here's what happens:
1) Completely removed old xpweb 3.2.1 installation, including the database
2) Install xpweb 3.3 to the following directory (on Windows):
c:\simplephp\root\xpweb
ie. the main xpweb files eg. team.php are in this folder.
3) copy across my old config_local.inc.php file. The only thing it changes is the root password.
4) check that I can see the config_test page OK
5) load the index.php file (it works, but I get the following PHP error:
[Mon Feb 27 14:36:21 2006] [error] [client 127.0.0.1] File does not exist: C:/SimplePHP/root/View
6) init the database. The database gets created, (but it then tells me it's an older version and I have to update it). No JavaScript errors, but lots of PHP errors, all pretty much the same, like this one:
[Mon Feb 27 14:37:07 2006] [error] [client 127.0.0.1] SQL ERROR:<br/>\r\n\t\t\t\t\t\tINSERT INTO\tprofiles_rights (profile_id, protected_section_id, right_type_id)\r\n\t\t\t\t\t\tSELECT\t\t(SELECT MAX(id) FROM user_profiles) as profileId, protected_sections.id as protectedId, right_types.id as rightId\r\n\t\t\t\t\t\tFROM\t\tprotected_sections, right_types\r\n\t\t\t\t\t\tWHERE\t\tprotected_sections.name1 = 'section'\r\n\t\t\t\t\t\tAND\t\tprotected_sections.name2 = 'index'\r\n\t\t\t\t\t\tAND\t\tright_types.type_name = 'all'<br/>You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT MAX(id) FROM user_profiles) as profileId, protected_sect, referer: http://localhost:8080/xpweb/index.php
7) then, I can log in as Admin (root) and create a user, but on the "team" page, there is no "user profiles" section at all. When creating a team member, there's only one option in the drop-down, which is administrator.
Sorry about the long post! Hope this helps,
Michael.
I like long posts!
At least I get the information...
Ok, so everything comes from the php errors... Which I don't get when installing on my mysql 5. Do you run version 5?
When trying to execute this, it worked:
INSERT INTO profiles_rights (profile_id,
protected_section_id, right_type_id) SELECT (SELECT MAX(id)
FROM user_profiles) as profileId, protected_sections.id as protectedId,
right_types.id as rightId FROM protected_sections,
right_types WHERE protected_sections.name1
= 'section' AND protected_sections.name2 =
'index' AND right_types.type_name = 'all'
... I'm wondering if this syntax isn't supported by your mysql?
I might split the request into two requests...
Olivier
Hi Michael...
Ok, I don't get the error but I see where it can come from. I made some changes for Postgresql and it seems your MySql doesn't like it.
I fixed it.
I'll post a new version soon, but in the meantime, please execute the following SQL (after you dropped and recreated your db) and you should be fine to play with XPWeb v3.3...
-- Update From 0
CREATE TABLE projects ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', description longtext NOT NULL, PRIMARY KEY (id) );
CREATE TABLE team_members ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', description longtext NOT NULL, PRIMARY KEY (id) );
CREATE TABLE projects_affectation ( project_id tinyint(4) NOT NULL default '0', team_member_id tinyint(4) NOT NULL default '0', PRIMARY KEY (project_id,team_member_id) );
CREATE TABLE metaphor_words ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', description longtext NOT NULL, project_id tinyint(4) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE project_link_types ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', PRIMARY KEY (id) );
CREATE TABLE project_links ( id tinyint(4) NOT NULL auto_increment, url varchar(255) NOT NULL default '', comment varchar(255) NOT NULL default '', project_id tinyint(4) NOT NULL default '0', type tinyint(4) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE web_categories ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', project_id tinyint(4) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE web_links ( id tinyint(4) NOT NULL auto_increment, url varchar(255) NOT NULL default '', name varchar(255) NOT NULL default '', description longtext NOT NULL, category_id tinyint(4) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE iterations ( id tinyint(4) NOT NULL auto_increment, project_id tinyint(4) NOT NULL default '0', name varchar(255) NOT NULL default '', description longtext NOT NULL, date date NOT NULL default '0000-00-00', PRIMARY KEY (id) );
CREATE TABLE stories ( id tinyint(4) NOT NULL auto_increment, iteration_id tinyint(4) NOT NULL default '0', project_id tinyint(4) NOT NULL default '0', name varchar(255) NOT NULL default '', description longtext NOT NULL, validation_criteria longtext NOT NULL, priority tinyint(2) NOT NULL default '0', risk tinyint(2) NOT NULL default '0', weight tinyint(2) NOT NULL default '0', PRIMARY KEY (id) );
CREATE TABLE tasks ( id tinyint(4) NOT NULL auto_increment, story_id tinyint(4) NOT NULL default '0', iteration_id tinyint(4) NOT NULL default '0', project_id tinyint(4) NOT NULL default '0', responsible_team_member_id tinyint(4) NOT NULL default '0', name varchar(255) NOT NULL default '', description longtext NOT NULL, start_date date NOT NULL default '0000-00-00', completion tinyint(2) NOT NULL default '0', weight tinyint(2) NOT NULL default '0', PRIMARY KEY (id) );
INSERT INTO project_link_types VALUES (1, 'modeling');
INSERT INTO project_link_types VALUES (2, 'test');
INSERT INTO project_link_types VALUES (3, 'doc');
INSERT INTO project_link_types VALUES (4, 'cvs');
INSERT INTO project_link_types VALUES (5, 'directory');
INSERT INTO project_link_types VALUES (6, 'javadoc');
-- Update From 1 (1)
CREATE TABLE tbl_users( username varchar(40) PRIMARY KEY, password varchar(60) NOT NULL, email varchar(40) NOT NULL, question varchar(200), answer varchar(30), lastlogin integer );
CREATE TABLE tbl_log( timestamp integer NOT NULL, ip varchar(16) NOT NULL DEFAULT 'no ip logged' , username varchar(40), action varchar(40), PRIMARY KEY(timestamp, ip) );
CREATE TABLE tbl_banned( ip varchar(16) PRIMARY KEY );
CREATE TABLE tbl_tries( username varchar(40) PRIMARY KEY, tries int, nextlogin int );
CREATE TABLE tbl_group( username varchar(40) PRIMARY KEY, gid int );
insert into tbl_group select username, 0 from tbl_users;
CREATE TABLE user_profiles ( id tinyint(4) NOT NULL auto_increment, name varchar(255) NOT NULL default '', description longtext NOT NULL, PRIMARY KEY (id) );
CREATE TABLE protected_sections ( id tinyint(4) NOT NULL auto_increment, name1 varchar(100) NOT NULL default '', name2 varchar(100) NOT NULL default '', PRIMARY KEY (id) );
CREATE TABLE right_types ( id tinyint(4) NOT NULL auto_increment, type_name varchar(100) NOT NULL default '', PRIMARY KEY (id) );
CREATE TABLE available_section_rights ( protected_section_id tinyint(4) NOT NULL default '0', right_type_id tinyint(4) NOT NULL default '0', PRIMARY KEY (protected_section_id, right_type_id) );
CREATE TABLE profiles_rights ( profile_id tinyint(4) NOT NULL default '0', protected_section_id tinyint(4) NOT NULL default '0', right_type_id tinyint(4) NOT NULL default '0', PRIMARY KEY (profile_id, protected_section_id) );
INSERT INTO right_types (type_name) VALUES ('no');
INSERT INTO right_types (type_name) VALUES ('all');
INSERT INTO right_types (type_name) VALUES ('proj');
INSERT INTO right_types (type_name) VALUES ('me');
INSERT INTO right_types (type_name) VALUES ('my');
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'index');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Projects');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Team');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'UserProfiles');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Planning');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'UserConfig');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'AdminConfig');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Metaphor');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Doc');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name IN ('all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Tests');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'CVS');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Links');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('project' ,'select');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('project' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('project' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('project' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('projectLink' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('projectLink' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('projectLink' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('profile' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('profile' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('profile' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'affect');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'changePass');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'changeProfile');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('member' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('iteration' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('iteration' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('iteration' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('story' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('story' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('story' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('task' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('task' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('task' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('metaphorWord' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('metaphorWord' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('metaphorWord' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webLink' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webLink' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webLink' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webCategory' ,'modify');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webCategory' ,'delete');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO protected_sections (name1 ,name2) VALUES ('webCategory' ,'insert');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO user_profiles (name, description) VALUES ('Anonymous' ,'Access without logging in');
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Anonymous' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO user_profiles (name, description) VALUES ('Admin' ,'Access with admin login');
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Admin' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO user_profiles (name, description) VALUES ('Developer' ,'Member of the developing team');
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'me';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name = 'me';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'my';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'my';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'my';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Developer' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO user_profiles (name, description) VALUES ('Coach' ,'Team coach');
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'all';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'no';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name = 'proj';
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE user_profiles.name = 'Coach' AND protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name = 'proj';
ALTER TABLE team_members ADD profile_id INT DEFAULT '0' NOT NULL AFTER id;
CREATE TABLE working_days ( setup_name VARCHAR( 11 ) DEFAULT '-1' NOT NULL , Mon TINYINT( 1 ) DEFAULT '1' , Tue TINYINT( 1 ) DEFAULT '1' , Wed TINYINT( 1 ) DEFAULT '1' , Thu TINYINT( 1 ) DEFAULT '1' , Fri TINYINT( 1 ) DEFAULT '1' , Sat TINYINT( 1 ) DEFAULT '0' , Sun TINYINT( 1 ) DEFAULT '0', PRIMARY KEY ( setup_name ));
INSERT INTO working_days (setup_name ,Mon ,Tue ,Wed ,Thu ,Fri ,Sat ,Sun ) VALUES ( 'ite_0' ,'1' ,'1' ,'1' ,'1' ,'1' ,'0' ,'0' );
ALTER TABLE iterations ADD working_days_name VARCHAR( 11 ) DEFAULT '-1' NOT NULL AFTER project_id;
ALTER TABLE tasks ADD working_days_name VARCHAR( 11 ) DEFAULT 'ite_0' NOT NULL AFTER responsible_team_member_id;
ALTER TABLE web_categories ADD description LONGTEXT AFTER name;
ALTER TABLE iterations ADD load_factor FLOAT DEFAULT '1.6' NOT NULL AFTER working_days_name;
-- Update From 2 (1)
ALTER TABLE `projects` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `team_members` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `projects_affectation` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `projects_affectation` CHANGE `team_member_id` `team_member_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `metaphor_words` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `metaphor_words` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `project_links` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `project_links` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `web_categories` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `web_categories` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `web_links` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `web_links` CHANGE `category_id` `category_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `iterations` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `iterations` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `stories` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `stories` CHANGE `iteration_id` `iteration_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `stories` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `tasks` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `tasks` CHANGE `story_id` `story_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `tasks` CHANGE `iteration_id` `iteration_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `tasks` CHANGE `project_id` `project_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `tasks` CHANGE `responsible_team_member_id` `responsible_team_member_id` INT UNSIGNED NOT NULL DEFAULT "0";
-- Update From 2.1 (1)
ALTER TABLE tasks ADD done FLOAT DEFAULT '0' NOT NULL AFTER weight;
ALTER TABLE tasks ADD todo FLOAT DEFAULT '0' NOT NULL AFTER done;
ALTER TABLE tasks ADD end_date DATE DEFAULT '1969-01-01' NOT NULL AFTER todo;
ALTER TABLE tasks ADD theory_end_comp FLOAT DEFAULT '-1' NOT NULL AFTER end_date;
CREATE TABLE version_info (version_no FLOAT NOT NULL ,PRIMARY KEY ( version_no ));
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'Reports');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Reports' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE protected_sections.name1 = "section" AND protected_sections.name2 = "Reports" AND right_types.type_name = "all";
UPDATE tasks SET done = ((completion*weight)/100)*1.6, todo = ((100-completion)*weight)/100 WHERE iteration_id = 0;
UPDATE tasks SET todo=-1 where completion <> 100 and todo = 0;
UPDATE tasks SET done=1 where done< 0;
ALTER TABLE tasks DROP completion;
ALTER TABLE tasks CHANGE weight weight FLOAT DEFAULT -1 NOT NULL;
-- Update From 2.2 (1)
-- Update From 2.3 (1)
ALTER TABLE version_info CHANGE version_no version_no VARCHAR(10) DEFAULT '0' NOT NULL;
-- Update From 2.3.1 (1)
ALTER TABLE tasks ADD auto INT DEFAULT '1' NOT NULL AFTER end_date;
-- Update From 2.4 (1)
INSERT INTO protected_sections (name1 ,name2) VALUES ('section' ,'XPCalendar');
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'XPCalendar' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO profiles_rights (profile_id, protected_section_id, right_type_id) SELECT user_profiles.id as profileId, protected_sections.id as protectedId, right_types.id as rightId FROM user_profiles, protected_sections, right_types WHERE protected_sections.name1 = "section" AND protected_sections.name2 = "XPCalendar" AND right_types.type_name = "all";
-- Update From 2.5 (1)
ALTER TABLE `available_section_rights` CHANGE `protected_section_id` `protected_section_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `available_section_rights` CHANGE `right_type_id` `right_type_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `profiles_rights` CHANGE `profile_id` `profile_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `profiles_rights` CHANGE `protected_section_id` `protected_section_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `profiles_rights` CHANGE `right_type_id` `right_type_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `project_link_types` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `project_links` CHANGE `type` `type` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `protected_sections` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `right_types` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `team_members` CHANGE `profile_id` `profile_id` INT UNSIGNED NOT NULL DEFAULT "0";
ALTER TABLE `user_profiles` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
-- Update From 2.5.1 (1) => nothing to do
-- Update From 2.5.2 (1)
DELETE FROM available_section_rights;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'index' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Projects' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Team' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserProfiles' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Planning' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'UserConfig' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'AdminConfig' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Metaphor' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Doc' AND right_types.type_name IN ('all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Tests' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'CVS' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Links' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'select' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'project' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'projectLink' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'profile' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'affect' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'changePass' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'changeProfile' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj', 'me') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'member' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'iteration' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'story' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'task' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj', 'my') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'metaphorWord' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webLink' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'modify' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'delete' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'webCategory' AND protected_sections.name2 = 'insert' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'Reports' AND right_types.type_name IN ('no', 'all', 'proj') ;
INSERT INTO available_section_rights( protected_section_id, right_type_id ) SELECT protected_sections.id AS id1, right_types.id AS id2 FROM protected_sections, right_types WHERE protected_sections.name1 = 'section' AND protected_sections.name2 = 'XPCalendar' AND right_types.type_name IN ('no', 'all', 'proj') ;
-- Update From 3.0 (1)
ALTER TABLE team_members ADD CONSTRAINT FOREIGN KEY ( profile_id ) REFERENCES user_profiles( id );
ALTER TABLE iterations ADD CONSTRAINT FOREIGN KEY ( working_days_name ) REFERENCES working_days( setup_name );
ALTER TABLE tasks ADD CONSTRAINT FOREIGN KEY ( working_days_name ) REFERENCES working_days( setup_name );
ALTER TABLE projects_affectation ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects ( id ), ADD CONSTRAINT FOREIGN KEY ( team_member_id ) REFERENCES team_members( id ) ;
ALTER TABLE metaphor_words ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE project_links ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id ), ADD CONSTRAINT FOREIGN KEY ( type ) REFERENCES project_link_types( id ) ;
ALTER TABLE web_categories ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE web_links ADD CONSTRAINT FOREIGN KEY ( category_id ) REFERENCES web_categories( id ) ;
ALTER TABLE iterations ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE stories ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE tasks ADD CONSTRAINT FOREIGN KEY ( project_id ) REFERENCES projects( id );
ALTER TABLE available_section_rights ADD CONSTRAINT FOREIGN KEY ( protected_section_id ) REFERENCES protected_sections( id ), ADD CONSTRAINT FOREIGN KEY ( right_type_id ) REFERENCES right_types( id );
ALTER TABLE profiles_rights ADD CONSTRAINT FOREIGN KEY ( profile_id ) REFERENCES user_profiles( id ), ADD CONSTRAINT FOREIGN KEY ( protected_section_id ) REFERENCES protected_sections( id ), ADD CONSTRAINT FOREIGN KEY ( right_type_id ) REFERENCES right_types( id );
-- Update From 3.0.1 (1)
ALTER TABLE `iterations` CHANGE `working_days_name` `working_days_name` VARCHAR( 11 ) DEFAULT "ite_0" NOT NULL ;
-- Update From 3.1 (1)
ALTER TABLE `tasks` ADD `pair_team_member_id` INT DEFAULT "0" NOT NULL AFTER responsible_team_member_id;
-- Update From 3.2 or 3.2.1 (1)
-- Time to set version in DB (1) : 3.3
DELETE FROM version_info;
INSERT INTO version_info VALUES("3.3");
Hi Olivier,
Yes, you were right, I just checked and I'm using MySQL 4.026 - I never even noticed before :)
Thanks for checking this for me. I'll recreate the DB and then execute the SQL code you've provided.
Thanks again,
Michael.
Hi,
I released version 3.3.1 yesterday and it includes the fix (I hope).
I suggest you re-install this version...
Olivier
Great! Thanks Olivier. What a hard-working developer you are :)
Michael.
Yesterday I enjoyed the power of Unix on my MacOSX and wrote a bash script that will package the XPWeb and readme files, zip and gzip it, and finally upload it to sourceforge... releases should be more frequent now!
Don't ask me why I'm doing this... I don't know the answer ;-)
Maybe for such messages... :o) thanks!
Olivier