head	1.2;
access;
symbols
	TIGRIS_1_1_0RC2:1.2
	TIGRIS_1_1_0RC1:1.2
	TIGRIS_1_1:1.2.0.4
	TIGRIS_1_0_8:1.2
	TIGRIS_1_0_8RC3:1.2
	TIGRIS_1_0_8RC2:1.2
	TIGRIS_1_0_8RC1:1.2
	TIGRIS_1_0_7:1.2
	TIGRIS_1_0_7RC3:1.2
	TIGRIS_1_0_7RC2:1.2
	TIGRIS_1_0_7RC1:1.2
	TIGRIS_1_0_6:1.2
	TIGRIS_1_0_6RC5:1.2
	TIGRIS_1_0_6RC4:1.2
	TIGRIS_1_0_6RC3:1.2
	TIGRIS_1_0_6RC2:1.2
	TIGRIS_1_0_6RC1:1.2
	TIGRIS_1_0_5:1.2
	TIGRIS_1_0_5RC6:1.2
	TIGRIS_1_0_5RC5:1.2
	TIGRIS_1_0_5RC4:1.2
	TIGRIS_1_0_5RC3:1.2
	TIGRIS_1_0_5RC2:1.2
	TIGRIS_1_0_5RC1:1.2
	TIGRIS_1_0_4:1.2
	TIGRIS_1_0_3:1.2
	TIGRIS_1_0_2:1.2
	TIGRIS_1_0_1:1.2
	TIGRIS_1_0:1.2.0.6
	TIGRIS_1_0_0:1.2
	TIGRIS_1_0_0_RC1:1.2.0.2;
locks; strict;
comment	@# @;


1.2
date	2001.03.21.01.57.32;	author leonardr;	state Exp;
branches;
next	1.1;

1.1
date	2001.03.21.00.39.25;	author leonardr;	state Exp;
branches;
next	;


desc
@@


1.2
log
@SQL scripts actually run all the way through now.
@
text
@drop table if exists xxxx_populate_UserRoleProject;
create table xxxx_populate_UserRoleProject
(
        USER_LOGIN    varchar(32) NOT NULL,
        ROLE_NAME     varchar(99) NOT NULL,
        PROJECT_NAME  varchar(64) NOT NULL,
        APPROVED_BY   varchar(32)
);

insert into xxxx_populate_UserRoleProject (USER_LOGIN, ROLE_NAME, PROJECT_NAME, APPROVED_BY)
       values 
  ("guest", "Anonymous Guest",      "*All public projects in domain", "root")
, ("guest", "Click-through Viewer", "*All projects in domain",        "root")
;

insert into HELM_USER_ROLE_PROJECT (USER_ID, ROLE_ID, PROJECT_ID, APPROVED_BY)
       select distinct User.userID, Role.roleID, Project.PROJECT_ID, Approved.userID
         from xxxx_populate_UserRoleProject as Tmp,
              User,
              Role,
              HELM_PROJECT as Project,
              User as Approved
        where Tmp.USER_LOGIN   = User.loginID
          and Tmp.ROLE_NAME    = Role.NAME
          and Tmp.PROJECT_NAME = Project.NAME
          and Tmp.APPROVED_BY  = Approved.LoginID
;

drop table if exists xxxx_populate_UserRoleProject;
@


1.1
log
@Added data migration scripts.
@
text
@d17 1
a17 1
       select distinct User.USER_ID, Role.ROLE_ID, Project.PROJECT_ID, Approved.USER_ID
d19 2
a20 2
              HELM_USER as User,
              HELM_ROLE as Role,
d22 2
a23 2
              HELM_USER as Approved
        where Tmp.USER_LOGIN   = User.LOGIN_NAME
d26 1
a26 1
          and Tmp.APPROVED_BY  = Approved.LOGIN_NAME
@

