Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 09518000

Von Sven Schöling vor fast 3 Jahren hinzugefügt

  • ID 095180009059dfec6d11e179fdb1bd6fc90f4b86
  • Vorgänger 35051213
  • Nachfolger e3a020ca

DeliveryOrder order_type db upgrade

is_sales noch nicht in der datenbank entfernt, nur im metasetup

Unterschiede anzeigen:

SL/DB/MetaSetup/DeliveryOrder.pm
23 23
  globalproject_id        => { type => 'integer' },
24 24
  id                      => { type => 'integer', not_null => 1, sequence => 'id' },
25 25
  intnotes                => { type => 'text' },
26
  is_sales                => { type => 'boolean' },
27 26
  itime                   => { type => 'timestamp', default => 'now()' },
28 27
  language_id             => { type => 'integer' },
29 28
  mtime                   => { type => 'timestamp' },
30 29
  notes                   => { type => 'text' },
30
  order_type              => { type => 'text', not_null => 1 },
31 31
  ordnumber               => { type => 'text' },
32 32
  oreqnumber              => { type => 'text' },
33 33
  payment_id              => { type => 'integer' },
sql/Pg-upgrade2/deliveryorder_type.sql
1
-- @tag: deliveryorder_type
2
-- @description: Persistente Typen in Lieferscheinen
3
-- @depends: release_3_5_8
4

  
5
ALTER TABLE delivery_orders ADD COLUMN order_type TEXT;
6

  
7
UPDATE delivery_orders SET order_type = 'sales_delivery_order' WHERE customer_id IS NOT NULL;
8
UPDATE delivery_orders SET order_type = 'purchase_delivery_order' WHERE vendor_id IS NOT NULL;
9

  
10
ALTER TABLE delivery_orders ALTER COLUMN order_type SET NOT NULL;
11

  
12

  

Auch abrufbar als: Unified diff