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


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


desc
@@


1.1
log
@Committing new script.
@
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_NAME       varchar(64),
  IS_PUBLIC         char(1),
  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_NAME, 
            IS_PUBLIC,
            SHORT_DESCRIPTION,
            LONG_DESCRIPTION,
            STATUS, 
            PROFILE,
            TYPE,
            ALIAS_URL,
            MEMBER_POLICY, 
            PROPOSED_BY, 
            APPROVED_BY
          )
##########################################################################
# Special projects.
  values ( "**HOST",       #Name
           NULL,           #License
           "N",            #Is public
           "The host",     #short desc
           "The entire host", #longdesc
           "",             #Status
           "special",      #Profile
           "host",         #Type         
           "",             #Alias URL
           1,              #Member Policy
           "root",         #Proposed By
           "root")         #Appoved By

       , ( "__DOMAIN__",   #Name
           NULL,           #License
           "N",            #Is public
           "The __DOMAIN__ domain", #short desc
           "The entire __DOMAIN__ domain", #longdesc
           "",             #Status
           "special",      #Profile
           "domain",       #Type         
           "",             #Alias URL
           2,              #Member Policy
           "root",         #Proposed By
           "root")         #Appoved By
;

insert into HELM_PROJECT 
          ( NAME,
            LICENSE_ID,
            IS_PUBLIC,
            SHORT_DESCRIPTION,
            LONG_DESCRIPTION,
            STATUS,
            PROFILE,
            TYPE,
            ALIAS_URL,
            MEMBER_POLICY,
            PROPOSED_BY,
            APPROVED_BY
           )
   select Tmp.NAME, 
          NULL,
          Tmp.IS_PUBLIC,
          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
       and Tmp.LICENSE_NAME IS NULL
;

drop table xxxx_populate_Project;

@
