/
UpgradeNotes.html
85 lines (77 loc) · 3.03 KB
/
UpgradeNotes.html
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!--
Copyright 2013 Josh Drummond
This file is part of WebPasswordSafe.
WebPasswordSafe is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
WebPasswordSafe is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with WebPasswordSafe; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WebPasswordSafe Upgrade Notes</title>
</head>
<body>
<h1>WebPasswordSafe Upgrade Notes</h1>
<h2>Version 1.2 to 1.3</h2>
<ol>
<li>Shutdown WebPasswordSafe v1.2</li>
<li>Run the following SQL to upgrade your webpasswordsafe database schema:
<ul>
<li>MySQL/MariaDB<br>
<pre>
ALTER TABLE users MODIFY username VARCHAR(100);
ALTER TABLE passwords MODIFY username VARCHAR(100);
ALTER TABLE audit_log MODIFY username VARCHAR(100);
ALTER TABLE password_data MODIFY password VARCHAR(300);
ALTER TABLE passwords DROP INDEX name;
</pre>
</li>
<li>MSSQL<br>
<pre>
ALTER TABLE users ALTER COLUMN username VARCHAR(100);
ALTER TABLE passwords ALTER COLUMN username VARCHAR(100);
ALTER TABLE audit_log ALTER COLUMN username VARCHAR(100);
ALTER TABLE password_data ALTER COLUMN password VARCHAR(300);
SELECT d.name FROM sys.tables t
JOIN sys.indexes d ON d.object_id = t.object_id AND d.type=2 AND d.is_unique=1
JOIN sys.index_columns ic ON d.index_id=ic.index_id AND ic.object_id=t.object_id
JOIN sys.columns c ON ic.column_id = c.column_id AND c.object_id=t.object_id
WHERE t.name = 'passwords' AND c.name='name';
ALTER TABLE passwords DROP CONSTRAINT {d.name};
</pre>
</li>
<li>PostgreSQL<br>
<pre>
ALTER TABLE users ALTER COLUMN username TYPE VARCHAR(100);
ALTER TABLE passwords ALTER COLUMN username TYPE VARCHAR(100);
ALTER TABLE audit_log ALTER COLUMN username TYPE VARCHAR(100);
ALTER TABLE password_data ALTER COLUMN password TYPE VARCHAR(300);
ALTER TABLE passwords DROP CONSTRAINT passwords_name_key;
</pre>
</li>
<li>Oracle<br>
<pre>
ALTER TABLE users MODIFY (username VARCHAR2(100));
ALTER TABLE passwords MODIFY (username VARCHAR2(100));
ALTER TABLE audit_log MODIFY (username VARCHAR2(100));
ALTER TABLE password_data MODIFY (password VARCHAR2(300));
SELECT constraint_name FROM all_constraints WHERE owner='WPS' AND table_name='PASSWORDS' AND constraint_type='U';
ALTER TABLE passwords DROP CONSTRAINT {constraint_name};
</pre>
</li>
</ul>
</li>
<li>Continue deployment of WebPasswordSafe v1.3</li>
</ol>
<br/>
</body>
</html>