1
# Copyright 2008-2015 Canonical
2
# Copyright 2015 Chicharreros (https://launchpad.net/~chicharreros)
4
# This program is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU Affero General Public License as
6
# published by the Free Software Foundation, either version 3 of the
7
# License, or (at your option) any later version.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU Affero General Public License for more details.
14
# You should have received a copy of the GNU Affero General Public License
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
# For further info, check http://launchpad.net/magicicada-server
19
"""Drop a couple columns that are no longer used for a long time."""
23
ALTER TABLE storageuserinfo DROP COLUMN pre_gen_client;
26
DROP VIEW share_delta_view;
29
CREATE VIEW share_delta_view AS
30
SELECT NULL::unknown AS share_id, o.id, o.owner_id,
31
o.volume_id, o.parent_id, o.name, o.content_hash, o.directory_hash,
32
o.kind, o.mimetype, o.when_created, o.when_last_modified, o.status,
33
o.path, o.publicfile_id, o.public_uuid, o.generation,
37
SELECT movefromshare.share_id, movefromshare.id,
38
movefromshare.owner_id, movefromshare.volume_id,
39
movefromshare.parent_id, movefromshare.name,
40
movefromshare.content_hash, movefromshare.directory_hash,
41
movefromshare.kind, movefromshare.mimetype, movefromshare.when_created,
42
movefromshare.when_last_modified, movefromshare.status,
44
movefromshare.publicfile_id, movefromshare.public_uuid,
45
movefromshare.generation, movefromshare.generation_created
49
ALTER TABLE object DROP COLUMN is_public;
55
"""Apply the patch."""