File: 19_dbmigrate.sql

package info (click to toggle)
kraft 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,112 kB
  • sloc: cpp: 28,535; sql: 1,248; perl: 396; xml: 330; python: 101; sh: 92; makefile: 10
file content (32 lines) | stat: -rw-r--r-- 1,334 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

# message Create new document type delivery note
INSERT INTO DocTypes (name) VALUES ('Lieferschein');
INSERT INTO attributes (hostObject, hostId, name, valueIsList) VALUES ('DocType', 
(SELECT docTypeID FROM DocTypes WHERE name='Lieferschein'), 'HidePrices', 'true');

INSERT INTO DocTypes (name) VALUES ('Delivery Receipt');
INSERT INTO attributes (hostObject, hostId, name, valueIsList) VALUES ('DocType', 
(SELECT docTypeID FROM DocTypes WHERE name='Delivery Receipt'), 'HidePrices', 'true');

# Delivery Receipt follows Offer

# mayfail
# message Add more document relation settings
INSERT INTO DocTypeRelations VALUES( (SELECT docTypeID FROM DocTypes WHERE name="Offer"),
	(SELECT docTypeID FROM DocTypes WHERE name="Delivery Receipt"), 12 );

# mayfail
INSERT INTO DocTypeRelations VALUES( (SELECT docTypeID FROM DocTypes WHERE name="Delivery Receipt"),
	(SELECT docTypeID FROM DocTypes WHERE name="Invoice"), 13 );

# Lieferschein follows Angebot
# mayfail
INSERT INTO DocTypeRelations VALUES( (SELECT docTypeID FROM DocTypes WHERE name="Angebot"),
(SELECT docTypeID FROM DocTypes WHERE name="Lieferschein"), 10 );

# Rechnung follows Lieferschein
# mayfail
INSERT INTO DocTypeRelations VALUES( (SELECT docTypeID FROM DocTypes WHERE name="Lieferschein"),
(SELECT docTypeID FROM DocTypes WHERE name="Rechnung"), 11 );

# Done.