summaryrefslogtreecommitdiff
path: root/README.1.5.0pre6
blob: 7e46264c7cc916db2badca9d424c69e46a7ca13e (plain)
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
33
34
35
36
37
CREATE TABLE cust_pay_refund (
    payrefundnum serial NOT NULL,
    paynum int NOT NULL,
    refundnum int NOT NULL,
    _date int NOT NULL,
    amount decimal(10,2) NOT NULL,
    PRIMARY KEY (payrefundnum)
);
CREATE INDEX cust_pay_refund1 ON cust_pay_refund(paynum);
CREATE INDEX cust_pay_refund2 ON cust_pay_refund(refundnum);

CREATE TABLE cust_pay_void (
  paynum int NOT NULL,
  custnum int NOT NULL,
  paid decimal(10,2) NOT NULL,
  _date int,
  payby char(4) NOT NULL,
  payinfo varchar(80),
  paybatch varchar(80),
  closed char(1),
  void_date int,
  reason varchar(80),
  otaker varchar(32) NOT NULL,
  PRIMARY KEY (paynum)
);
CREATE INDEX cust_pay_void1 ON cust_pay_void(custnum);

alter table svc_external alter column id drop not null;
alter table h_svc_external alter column id drop not null;

INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 20, 'svc_external-id', 'en_US', 'External ID' );
INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 21, 'svc_external-title', 'en_US', 'Title' );

dbdef-create username
create-history-tables username cust_pay_refund cust_pay_void
dbdef-create username