=====================
AIDE AUX MISES À JOUR
=====================

--------------------------------------------------
Updgrade à partir d'une version < 1.2
--------------------------------------------------

Si vous utilisiez des templates sur mesures et non pas directement ceux inclus dans Kiwi,
les tags templates de rendu du type "wiki2xhtml_*" ont changé, vous devrez mettre à jour 
vos template en conséquences (voyez ceux de Kiwi pour référence).

--------------------------------------------------
SQL pour l'updgrade à partir d'une version < 1.0.1
--------------------------------------------------

À faire avant le django-syncdb :

ALTER TABLE "kiwi_template" ALTER COLUMN "title" TYPE varchar(100);
ALTER TABLE "kiwi_template" ADD COLUMN "included" boolean DEFAULT FALSE;
ALTER TABLE "kiwi_template" ALTER COLUMN "included" SET NOT NULL;
ALTER TABLE "kiwi_wikipage" ADD COLUMN "display_attachs" boolean DEFAULT FALSE;
ALTER TABLE "kiwi_wikipage" ALTER COLUMN "display_attachs" SET NOT NULL;
ALTER TABLE "kiwi_template" ALTER COLUMN "included" DROP DEFAULT;
ALTER TABLE "kiwi_wikipage" ALTER COLUMN "display_attachs" DROP DEFAULT;

Puis juste après le django-syncdb :

CREATE TABLE "kiwi_wikipage_attached_files" (
    "id" serial NOT NULL PRIMARY KEY,
    "wikipage_id" integer NOT NULL REFERENCES "kiwi_wikipage" ("id") DEFERRABLE INITIALLY DEFERRED,
    "attach_id" integer NOT NULL REFERENCES "kiwi_attach" ("id") DEFERRABLE INITIALLY DEFERRED,
    UNIQUE ("wikipage_id", "attach_id")
);
