f2ee7e20f914915e49acd439b8e1e2ff879de819
[freeside.git] / README.1.5.0pre6
1 CREATE TABLE cust_pay_refund (
2     payrefundnum serial NOT NULL,
3     paynum int NOT NULL,
4     refundnum int NOT NULL,
5     _date int NOT NULL,
6     amount decimal(10,2) NOT NULL,
7     PRIMARY KEY (payrefundnum)
8 );
9 CREATE INDEX cust_pay_refund1 ON cust_pay_refund(paynum);
10 CREATE INDEX cust_pay_refund2 ON cust_pay_refund(refundnum);
11
12 CREATE TABLE cust_pay_void (
13   paynum int NOT NULL,
14   custnum int NOT NULL,
15   paid decimal(10,2) NOT NULL,
16   _date int,
17   payby char(4) NOT NULL,
18   payinfo varchar(80),
19   paybatch varchar(80),
20   closed char(1),
21   void_date int,
22   reason varchar(80),
23   otaker varchar(32) NOT NULL,
24   PRIMARY KEY (paynum)
25 );
26 CREATE INDEX cust_pay_void1 ON cust_pay_void(custnum);
27
28 alter table svc_external alter column id drop not null;
29 alter table h_svc_external alter column id drop not null;
30
31 INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 20, 'svc_external-id', 'en_US', 'External ID' );
32 INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 21, 'svc_external-title', 'en_US', 'Title' );
33
34 CREATE TABLE part_pkg_option (
35   optionnum int primary key,
36   pkgpart int not null,
37   optionname varchar(80) not null,
38   optionvalue text NULL
39 );
40 CREATE INDEX part_pkg_option1 ON part_pkg_option ( pkgpart );
41 CREATE INDEX part_pkg_option2 ON part_pkg_option ( optionname );
42
43 dbdef-create username
44 create-history-tables username cust_pay_refund cust_pay_void part_pkg_option
45 dbdef-create username
46