Statistics
| Branch: | Tag: | Revision:

root / snf-pithos-app / README.upgrade @ d21f29f0

History | View | Annotate | Download (2.5 kB)

1 4a1c29ea Antony Chazapis
UPGRADE
2 4a1c29ea Antony Chazapis
=======
3 4a1c29ea Antony Chazapis
4 4a1c29ea Antony Chazapis
0.7.9 -> 0.7.10
5 4a1c29ea Antony Chazapis
---------------
6 dfb1fafa Antony Chazapis
* Update settings.py (BACKEND_*, SERVICE_NAME, \*_EMAIL, \*_TARGET, IM_*)
7 dfb1fafa Antony Chazapis
* Update ``attributes`` table in mysql (backend)::
8 4a1c29ea Antony Chazapis
    
9 c95d1471 Antony Chazapis
    mysql> update attributes set `key`='ETag' where `key`='hash';
10 c95d1471 Antony Chazapis
11 dfb1fafa Antony Chazapis
* Upgrade ``im_user`` table (im app)::
12 c95d1471 Antony Chazapis
    
13 c95d1471 Antony Chazapis
    ALTER TABLE im_user ADD COLUMN 'password' VARCHAR(255);
14 4a1c29ea Antony Chazapis
15 10273d76 Antony Chazapis
0.7.10 -> 0.8.0
16 cb446fb8 Antony Chazapis
---------------
17 dfb1fafa Antony Chazapis
* Upgrade ``public`` table in mysql (backend):
18 dfb1fafa Antony Chazapis
  
19 dfb1fafa Antony Chazapis
  * Run: mysqldump pithosdb public > public-table.sql
20 dfb1fafa Antony Chazapis
  * mysql> drop table public;
21 dfb1fafa Antony Chazapis
  * Update the codebase and run the server so the new public table is created
22 dfb1fafa Antony Chazapis
  * From the sql dump above, take the row::
23 dfb1fafa Antony Chazapis
    
24 dfb1fafa Antony Chazapis
    INSERT INTO `public` VALUES (...);
25 dfb1fafa Antony Chazapis
    
26 dfb1fafa Antony Chazapis
    Rewrite as::
27 dfb1fafa Antony Chazapis
    
28 dfb1fafa Antony Chazapis
    INSERT INTO `public`(`path`) VALUES (...);
29 dfb1fafa Antony Chazapis
    
30 dfb1fafa Antony Chazapis
    And execute in the database
31 dfb1fafa Antony Chazapis
32 315f4bae Antony Chazapis
* Create settings.local with local setting overrides
33 0f8ffac4 Antony Chazapis
* Install python-django-south
34 dfb1fafa Antony Chazapis
* Setup south::
35 dfb1fafa Antony Chazapis
    
36 0c581627 Sofia Papagiannaki
    python manage.py syncdb
37 0c581627 Sofia Papagiannaki
    python manage.py migrate im 0001 --fake
38 0c581627 Sofia Papagiannaki
    python manage.py migrate im
39 cb446fb8 Antony Chazapis
40 cb446fb8 Antony Chazapis
0.8.0 -> 0.8.1
41 cb446fb8 Antony Chazapis
--------------
42 dfb1fafa Antony Chazapis
* Reset ``policy`` table in mysql (backend)::
43 cb446fb8 Antony Chazapis
    
44 cb446fb8 Antony Chazapis
    mysql> update policy set `value`='auto' where `key`='versioning';
45 1e20eb36 Antony Chazapis
46 1e20eb36 Antony Chazapis
0.8.1 -> 0.8.2
47 1e20eb36 Antony Chazapis
--------------
48 dfb1fafa Antony Chazapis
* Add the ``X-Forwarded-Protocol`` header directive in the apache configuration, as described in the admin guide
49 dfb1fafa Antony Chazapis
* Update ``attributes`` table in mysql (backend)::
50 d4493d99 Antony Chazapis
    
51 d4493d99 Antony Chazapis
    mysql> CREATE TABLE `attributes_new` (
52 d4493d99 Antony Chazapis
               `serial` int(11) NOT NULL,
53 d4493d99 Antony Chazapis
               `domain` varchar(255) COLLATE utf8_bin NOT NULL,
54 d4493d99 Antony Chazapis
               `key` varchar(255) COLLATE utf8_bin NOT NULL,
55 d4493d99 Antony Chazapis
               `value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
56 d4493d99 Antony Chazapis
               PRIMARY KEY (`serial`,`domain`,`key`),
57 d4493d99 Antony Chazapis
               CONSTRAINT FOREIGN KEY (`serial`) REFERENCES `versions` (`serial`) ON DELETE CASCADE ON UPDATE CASCADE
58 d4493d99 Antony Chazapis
           ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
59 d4493d99 Antony Chazapis
    mysql> insert into attributes_new select `serial`, 'pithos', `key`, `value` from attributes;
60 d4493d99 Antony Chazapis
    mysql> drop table attributes;
61 d4493d99 Antony Chazapis
    mysql> alter table attributes_new rename to attributes;
62 044f4210 Antony Chazapis
63 dfb1fafa Antony Chazapis
* Update ``versions`` table in mysql (backend)::
64 044f4210 Antony Chazapis
    
65 044f4210 Antony Chazapis
    mysql> create temporary table tmp_uuids as select distinct node, uuid() as `uuid` from versions;
66 044f4210 Antony Chazapis
    mysql> alter table versions add column `uuid` varchar(64) DEFAULT '' NOT NULL after `muser`;
67 044f4210 Antony Chazapis
    mysql> update versions v, tmp_uuids u set v.`uuid` = u.`uuid` where v.`node` = u.`node`;
68 044f4210 Antony Chazapis
    mysql> create index idx_versions_node_uuid on versions(uuid);
69 afb8520d Antony Chazapis
70 afb8520d Antony Chazapis
0.8.2 -> 0.9.0
71 afb8520d Antony Chazapis
--------------
72 afb8520d Antony Chazapis
* No upgrade path provided. Please reinstall and reconfigure.