[ Index ]
 

Code source de eZ Publish 3.9.0

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

title

Body

[fermer]

/update/database/postgresql/3.6/unstable/ -> dbupdate-3.5.2-to-3.6.0beta1.sql (source)

   1  UPDATE ezsite_data SET value='3.6.0beta1' WHERE name='ezpublish-version';
   2  UPDATE ezsite_data SET value='1' WHERE name='ezpublish-release';
   3  
   4  ALTER TABLE ezrss_export_item ADD COLUMN subnodes integer;
   5  UPDATE ezrss_export_item SET subnodes='0';
   6  ALTER TABLE ezrss_export_item ALTER subnodes SET NOT NULL;
   7  ALTER TABLE ezrss_export_item ALTER subnodes SET DEFAULT 0;
   8  
   9  ALTER TABLE ezrss_export ADD COLUMN number_of_objects integer;
  10  -- Old behaviour of RSS was that it fed 5 items
  11  UPDATE ezrss_export SET number_of_objects='5';
  12  ALTER TABLE ezrss_export ALTER number_of_objects SET NOT NULL;
  13  ALTER TABLE ezrss_export ALTER number_of_objects SET DEFAULT 0;
  14  
  15  ALTER TABLE ezrss_export ADD COLUMN main_node_only integer;
  16  -- Old behaviour of RSS was that all nodes have been shown,
  17  -- i.e. including those besides the main node
  18  UPDATE ezrss_export SET main_node_only='1';
  19  ALTER TABLE ezrss_export ALTER main_node_only SET NOT NULL;
  20  ALTER TABLE ezrss_export ALTER main_node_only SET DEFAULT 1;
  21  
  22  ALTER TABLE ezcontentobject_link ADD COLUMN contentclassattribute_id INT;
  23  UPDATE ezcontentobject_link SET contentclassattribute_id='0';
  24  ALTER TABLE ezcontentobject_link ALTER COLUMN contentclassattribute_id SET DEFAULT 0;
  25  ALTER TABLE ezcontentobject_link ALTER COLUMN contentclassattribute_id SET NOT NULL;
  26  CREATE INDEX ezco_link_to_co_id ON ezcontentobject_link ( to_contentobject_id );
  27  CREATE INDEX ezco_link_from     ON ezcontentobject_link ( from_contentobject_id,
  28                                                            from_contentobject_version,
  29                                                            contentclassattribute_id );
  30  
  31  
  32  
  33  -- Add missing index for orders
  34  CREATE INDEX ezorder_is_tmp ON ezorder USING btree (is_temporary);
  35  
  36  ALTER TABLE ezorder ADD status_id integer;
  37  ALTER TABLE ezorder ALTER status_id SET DEFAULT 0;
  38  
  39  ALTER TABLE ezorder ADD status_modified integer;
  40  ALTER TABLE ezorder ALTER status_modified SET DEFAULT 0;
  41  
  42  ALTER TABLE ezorder ADD status_modifier_id integer;
  43  ALTER TABLE ezorder ALTER status_modifier_id SET DEFAULT 0;
  44  
  45  
  46  CREATE SEQUENCE ezorder_status_s
  47      START 1
  48      INCREMENT 1
  49      MAXVALUE 9223372036854775807
  50      MINVALUE 1
  51      CACHE 1;
  52  
  53  CREATE TABLE ezorder_status (
  54      id integer NOT NULL DEFAULT nextval('ezorder_status_s'::text),
  55      status_id integer NOT NULL DEFAULT 0,
  56      name varchar(255) NOT NULL DEFAULT '',
  57      is_active integer NOT NULL DEFAULT 1
  58  );
  59  
  60  ALTER TABLE ONLY ezorder_status
  61      ADD CONSTRAINT ezorder_status_pkey PRIMARY KEY (id);
  62  
  63  CREATE INDEX ezorder_status_sid ON ezorder_status USING btree  (status_id);
  64  CREATE INDEX ezorder_status_name ON ezorder_status USING btree (name);
  65  CREATE INDEX ezorder_status_active ON ezorder_status USING btree  (is_active);
  66  
  67  INSERT INTO ezorder_status (status_id, name, is_active)
  68  VALUES( 1, 'Pending', 1 );
  69  INSERT INTO ezorder_status (status_id, name, is_active)
  70  VALUES( 2, 'Processing', 1 );
  71  INSERT INTO ezorder_status (status_id, name, is_active)
  72  VALUES( 3, 'Delivered', 1 );
  73  
  74  CREATE SEQUENCE ezorder_status_history_s
  75      START 1
  76      INCREMENT 1
  77      MAXVALUE 9223372036854775807
  78      MINVALUE 1
  79      CACHE 1;
  80  
  81  CREATE TABLE ezorder_status_history (
  82      id integer NOT NULL DEFAULT nextval('ezorder_status_history_s'::text),
  83      order_id integer NOT NULL DEFAULT 0,
  84      status_id integer NOT NULL DEFAULT 0,
  85      modifier_id integer NOT NULL DEFAULT 0,
  86      modified integer NOT NULL DEFAULT 0
  87  );
  88  
  89  ALTER TABLE ONLY ezorder_status_history
  90      ADD CONSTRAINT ezorder_status_history_pkey PRIMARY KEY (id);
  91  
  92  CREATE INDEX ezorder_status_history_oid ON ezorder_status_history USING btree (order_id);
  93  CREATE INDEX ezorder_status_history_sid ON ezorder_status_history USING btree  (status_id);
  94  CREATE INDEX ezorder_status_history_mod ON ezorder_status_history USING btree (modified);
  95  
  96  
  97  -- Make sure each order has a history element with Pending status
  98  INSERT INTO ezorder_status_history (order_id, status_id, modifier_id, modified)
  99  SELECT order_nr AS order_id, 1 AS status_id, user_id AS modifier_id, created AS modified FROM ezorder WHERE status_id = 0;
 100  
 101  -- Update status of all orders to Pending
 102  UPDATE ezorder SET status_id = 1, status_modifier_id = user_id, status_modified = created WHERE status_id = 0;


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