-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb-update-300.sql
42 lines (33 loc) · 1.23 KB
/
db-update-300.sql
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
38
39
40
41
42
-- Database update for 3.0.0
ALTER TABLE UserAccount ADD is_admin BOOL DEFAULT FALSE;
INSERT INTO UserAccount SET name='AvantFAX Admin', username='admin', password='5f4dcc3b5aa765d61d8327deb882cf99', wasreset=TRUE, email='[email protected]', is_admin = TRUE, acc_enabled = TRUE, superuser = TRUE;
ALTER TABLE UserPasswords DROP adminpwd;
ALTER TABLE FaxArchive change faxnumid faxnumid INT;
DROP TABLE AdminAccount;
-- DROP TABLE UserRubrica;
-- DROP TABLE Rubrica;
-- DROP TABLE FaxNum;
-- AddressBook table
CREATE TABLE IF NOT EXISTS AddressBook (
abook_id INT auto_increment KEY,
company VARCHAR(255)
) DEFAULT CHARACTER SET utf8;
CREATE TABLE IF NOT EXISTS AddressBookEmail (
abookemail_id INT auto_increment KEY,
abook_id INT,
contact_name VARCHAR(255),
contact_email VARCHAR(255) NOT NULL
) DEFAULT CHARACTER SET utf8;
CREATE TABLE IF NOT EXISTS AddressBookFAX (
abookfax_id INT auto_increment KEY,
abook_id INT,
faxnumber VARCHAR(20) NOT NULL,
email VARCHAR(100),
description VARCHAR(30),
to_person VARCHAR(150),
to_location VARCHAR(150),
to_voicenumber VARCHAR(150),
faxcatid INT,
faxfrom INT DEFAULT 0,
faxto INT DEFAULT 0
) DEFAULT CHARACTER SET utf8;