1 NOTE: Version numbering has been simplified. 1.5.7 is the version after
2 1.5.0pre6. It is still a development version - releases with odd numbered
3 middle parts (NN in x.NN.x) are development versions, like Perl or Linux.
5 install DBIx::DBSchema 0.24
8 ratenum serial NOT NULL,
9 ratename varchar(80) NOT NULL,
13 CREATE TABLE rate_detail (
15 orig_regionnum int NULL,
16 dest_regionnum int NOT NULL,
17 min_included int NOT NULL,
18 min_charge decimal(10,2) NOT NULL,
19 sec_granularity int NOT NULL
21 CREATE UNIQUE INDEX rate_detail1 ON rate_detail ( ratenum, orig_regionnum, dest_regionnum );
23 CREATE TABLE rate_region (
24 regionnum serial NOT NULL,
25 regionname varchar(80) NOT NULL,
26 PRIMARY KEY (regionnum)
29 CREATE TABLE rate_prefix (
30 prefixnum serial NOT NULL,
31 regionnum int NOT NULL,
32 countrycode varchar(3) NOT NULL,
35 PRIMARY KEY (prefixnum)
37 CREATE INDEX rate_prefix1 ON rate_prefix ( countrycode );
38 CREATE INDEX rate_prefix2 ON rate_prefix ( regionnum );
40 CREATE TABLE reg_code (
41 codenum serial NOT NULL,
42 code varchar(80) NOT NULL,
43 agentnum int NOT NULL,
46 CREATE UNIQUE INDEX reg_code1 ON reg_code ( agentnum, code );
47 CREATE INDEX reg_code2 ON reg_code ( agentnum );
49 CREATE TABLE reg_code_pkg (
53 CREATE UNIQUE INDEX reg_code_pkg1 ON reg_code_pkg ( codenum, pkgpart );
54 CREATE INDEX reg_code_pkg2 ON reg_code_pkg ( codenum );
56 CREATE TABLE clientapi_session (
57 sessionnum serial NOT NULL,
58 sessionid varchar(80) NOT NULL,
59 namespace varchar(80) NOT NULL,
60 PRIMARY KEY (sessionnum)
62 CREATE UNIQUE INDEX clientapi_session1 ON clientapi_session ( sessionid, namespace );
64 CREATE TABLE clientapi_session_field (
65 fieldnum serial NOT NULL,
66 sessionnum int NOT NULL,
67 fieldname varchar(80) NOT NULL,
69 PRIMARY KEY (fieldnum)
71 CREATE UNIQUE INDEX clientapi_session_field1 ON clientapi_session_field ( sessionnum, fieldname );
73 ALTER TABLE part_pkg ADD promo_code varchar(80) NULL;
74 ALTER TABLE h_part_pkg ADD promo_code varchar(80) NULL;
75 CREATE INDEX part_pkg2 ON part_pkg ( promo_code );
76 CREATE INDEX h_part_pkg2 ON h_part_pkg ( promo_code );
78 ALTER TABLE cust_main ALTER COLUMN zip DROP NOT NULL;
79 ALTER TABLE h_cust_main ALTER COLUMN zip DROP NOT NULL;
81 ALTER TABLE prepay_credit ADD agentnum integer NULL;
82 ALTER TABLE h_prepay_credit ADD agentnum integer NULL;
84 Installs w/integrated RT:
85 CREATE SEQUENCE attributes_id_seq;
87 CREATE TABLE Attributes (
88 id INTEGER DEFAULT nextval('attributes_id_seq'),
89 Name varchar(255) NOT NULL ,
90 Description varchar(255) NULL ,
92 ContentType varchar(16),
93 ObjectType varchar(64),
94 ObjectId integer, -- foreign key to anything
95 Creator integer NOT NULL DEFAULT 0 ,
96 Created TIMESTAMP NULL ,
97 LastUpdatedBy integer NOT NULL DEFAULT 0 ,
98 LastUpdated TIMESTAMP NULL ,
103 CREATE INDEX Attributes1 on Attributes(Name);
104 CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);
107 dbdef-create username
108 create-history-tables username rate rate_detail rate_region rate_prefix reg_code reg_code_pkg
109 dbdef-create username
111 install Javascript::RPC (JavaScript::RPC::Server::CGI), Text::CSV_XS,
112 Spreadsheet::WriteExcel, IO-stringy (IO::Scalar) and Frontier::RPC
115 afterwords (for installs w/integrated RT):
118 /opt/rt3/sbin/rt-setup-database --action insert --datadir etc/upgrade/3.1.15
119 /opt/rt3/sbin/rt-setup-database --action insert --datadir etc/upgrade/3.1.17