Revision aaf3c36e
Von Sven Schöling vor etwa 3 Jahren hinzugefügt
SL/DB/MetaSetup/DeliveryOrder.pm | ||
---|---|---|
22 | 22 |
globalproject_id => { type => 'integer' }, |
23 | 23 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
24 | 24 |
intnotes => { type => 'text' }, |
25 |
is_sales => { type => 'boolean' }, |
|
26 | 25 |
itime => { type => 'timestamp', default => 'now()' }, |
27 | 26 |
language_id => { type => 'integer' }, |
28 | 27 |
mtime => { type => 'timestamp' }, |
29 | 28 |
notes => { type => 'text' }, |
29 |
order_type => { type => 'text', not_null => 1 }, |
|
30 | 30 |
ordnumber => { type => 'text' }, |
31 | 31 |
oreqnumber => { type => 'text' }, |
32 | 32 |
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
DeliveryOrder order_type db upgrade
is_sales noch nicht in der datenbank entfernt, nur im metasetup