head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


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


desc
@@


1.1
log
@Since edk got rid of __DOMAIN__ reference, there's no need for this to be a .in
@
text
@

####################################################
##
## Create a temp table to hold the non-keyed values
##
##

drop table if exists xxxx_populate_Project;
create table xxxx_populate_Project (
  NAME              varchar(64) DEFAULT '' NOT NULL,  
  LICENSE           varchar(64),
  SHORT_DESCRIPTION varchar(128),
  LONG_DESCRIPTION  text,
  STATUS            text,
  PROFILE           VARCHAR(11),
  TYPE              VARCHAR(8),
  ALIAS_URL         varchar(128),
  MEMBER_POLICY     integer,
  PROPOSED_BY       varchar(32) NOT NULL,
  APPROVED_BY       varchar(32) NOT NULL
);

insert into xxxx_populate_Project
          ( NAME, 
             LICENSE, 
             SHORT_DESCRIPTION,
             LONG_DESCRIPTION,
             STATUS, 
   	     PROFILE,
             TYPE,
             ALIAS_URL,
             MEMBER_POLICY, 
             PROPOSED_BY, 
             APPROVED_BY
           )
 
 ####################################################################### 
 # Category projects.
   values ( "other",        #Name
            "BSD",             #License
            "Other", #short desc
 	   "Any kind of project.",             #Long desc
            "",             #Status
 	   "category",     #Profile
            "category",     #Type         
            "",             #Alias URL
            3,              #Member Policy
            "root",         #Proposed By
            "root")         #Appoved By
 ;


 ##now insert the values into the correct table replacing
 ##names with ids from the corresponding tables

insert into HELM_PROJECT 
          ( NAME,
            LICENSE,
            SHORT_DESCRIPTION,
            LONG_DESCRIPTION,
            STATUS,
	    PROFILE,
	    TYPE,
            ALIAS_URL,
            MEMBER_POLICY,
            PROPOSED_BY,
            APPROVED_BY
           )
   select Tmp.NAME, 
          Tmp.LICENSE, 
          Tmp.SHORT_DESCRIPTION,
          Tmp.LONG_DESCRIPTION, 
          Tmp.STATUS, 
          Tmp.PROFILE, 
          Tmp.TYPE, 
          Tmp.ALIAS_URL,
	  Tmp.MEMBER_POLICY, 
          Proposed.USER_ID, 
          Appoved.USER_ID
     from xxxx_populate_Project as Tmp,
          HELM_USER as Proposed,
          HELM_USER as Appoved
     where Tmp.PROPOSED_BY = Proposed.LOGIN_NAME
       and Tmp.APPROVED_BY = Appoved.LOGIN_NAME
;

drop table xxxx_populate_Project;

@
