[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/kernel/classes/datatypes/ezenum/ -> ezenum.sql (source)

   1  # sql script for MySql
   2  
   3  drop table if exists ezenumvalue;
   4  CREATE TABLE ezenumvalue (
   5  id int auto_increment not null,
   6  contentclass_attribute_id int not null,
   7  contentclass_attribute_version int not null,
   8  enumelement varchar(50) not null,
   9  enumvalue varchar(50) not null,
  10  placement int not null,
  11  primary key( id, contentclass_attribute_id, contentclass_attribute_version ) );
  12  
  13  
  14  # EnumObjectValue:
  15  drop table if exists ezenumobjectvalue;
  16  CREATE TABLE ezenumobjectvalue (
  17  contentobject_attribute_id int not null,
  18  contentobject_attribute_version int not null,
  19  enumid int not null,
  20  enumelement varchar(50) not null,
  21  enumvalue varchar(50) not null,
  22  primary key( contentobject_attribute_id,contentobject_attribute_version,enumid ) );
  23  
  24  
  25  #####################################################################################
  26  # sql script for PostgreSql
  27  
  28  drop SEQUENCE ezenumvalue_s ;
  29  CREATE SEQUENCE ezenumvalue_s;
  30  
  31  drop table ezenumvalue;
  32  CREATE TABLE ezenumvalue (
  33  id int DEFAULT nextval('ezenumvalue_s') not null,
  34  contentclass_attribute_id int not null,
  35  contentclass_attribute_version int not null,
  36  enumelement varchar(50) not null,
  37  enumvalue varchar(50) not null,
  38  placement int not null,
  39  primary key( id, contentclass_attribute_id, contentclass_attribute_version ) );
  40  
  41  
  42  
  43  # EnumObjectValue:
  44  drop table ezenumobjectvalue;
  45  CREATE TABLE ezenumobjectvalue (
  46  contentobject_attribute_id int not null,
  47  contentobject_attribute_version int not null,
  48  enumid int not null,
  49  enumelement varchar(50) not null,
  50  enumvalue varchar(50) not null,
  51  primary key( contentobject_attribute_id,contentobject_attribute_version,enumid ) );
  52  
  53  
  54  #######################################################################################
  55  # sql script for Oracle
  56  
  57  drop SEQUENCE ezenumvalue_s ;
  58  CREATE SEQUENCE ezenumvalue_s;
  59  
  60  drop table ezenumvalue;
  61  CREATE TABLE ezenumvalue (
  62  id int not null,
  63  contentclass_attribute_id int not null,
  64  contentclass_attribute_version int not null,
  65  enumelement varchar(50) not null,
  66  enumvalue varchar(50) not null,
  67  placement int not null,
  68  primary key( id, contentclass_attribute_id, contentclass_attribute_version ) );
  69  
  70  create or replace trigger ezenumvalue_tr
  71  before insert on ezenumvalue
  72  for each row
  73  begin
  74  select ezenumvalue_s.nextval into :new.id from dual;
  75  end;
  76  
  77  # EnumObjectValue:
  78  drop table ezenumobjectvalue;
  79  CREATE TABLE ezenumobjectvalue (
  80  contentobject_attribute_id int not null,
  81  contentobject_attribute_version int not null,
  82  enumid int not null,
  83  enumelement varchar(50) not null,
  84  enumvalue varchar(50) not null,
  85  primary key( contentobject_attribute_id,contentobject_attribute_version,enumid ) );


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7