forked from pinax/pinax-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG
100 lines (67 loc) · 2.66 KB
/
CHANGELOG
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
=========
CHANGELOG
=========
Summary of Changes
==================
0.2.dev2
--------
* Made sections model based instead of configured through settings.
Backward Incompatible Changes
=============================
Basically anywhere where your app might have been relying on interacting with
sections, there is risk for breakage. All URLs that had section names in them
will be fine as soon as you populate the Section model with the same data.
It is recommended that you do this locally, and then create a fixture to aide
in deployment with minimal downtime.
The changes:
* removed biblion.exceptions
* removed biblion.settings
* removed Post.objects.section()
* changed Post.section from an IntegerField to an ForeignKey to the new Section model
* removed Post.section_idx static method
* removed Post().section_slug property
* changed the blog_section url's first kwarg from section to section_slug
* changed the blog_feed view's section kwarg parameter to section_slug
Schema Changes
==============
::
### New Model: biblion.Section
CREATE TABLE "biblion_section" (
"id" serial NOT NULL PRIMARY KEY,
"blog_id" integer NOT NULL REFERENCES "biblion_blog" ("id") DEFERRABLE INITIALLY DEFERRED,
"name" varchar(128) NOT NULL,
"slug" varchar(50) NOT NULL
)
;
CREATE INDEX "biblion_section_blog_id" ON "biblion_section" ("blog_id");
CREATE INDEX "biblion_section_slug" ON "biblion_section" ("slug");
CREATE INDEX "biblion_section_slug_like" ON "biblion_section" ("slug" varchar_pattern_ops);
INSERT INTO "biblion_section" ("blog_id", "name", "slug")
VALUES (1, 'All', 'all');
ALTER TABLE "biblion_post" ADD COLUMN "section_id" integer
REFERENCES "biblion_section" ("id") DEFERRABLE INITIALLY DEFERRED;
UPDATE "biblion_post" SET "section_id" = (SELECT max("id") FROM "biblion_section");
COMMIT; BEGIN;
ALTER TABLE "biblion_post" ALTER COLUMN "section_id" SET NOT NULL;
0.2.dev1
--------
* Added a support for multiple blogs
Schema Changes
==============
0.2.dev1
--------
::
### New Model: biblion.Blog
CREATE TABLE "biblion_blog" (
"id" serial NOT NULL PRIMARY KEY,
"title" varchar(128) NOT NULL,
"subtitle" varchar(256)
)
;
INSERT INTO "biblion_blog" ("title", "subtitle")
VALUES ('Default title', 'Default subtitle');
ALTER TABLE "biblion_post" ADD COLUMN "blog_id" integer
REFERENCES "biblion_blog" ("id") DEFERRABLE INITIALLY DEFERRED;
UPDATE "biblion_post" SET "blog_id" = (SELECT max("id") FROM "biblion_blog");
COMMIT;BEGIN;
ALTER TABLE "biblion_post" ALTER COLUMN "blog_id" SET NOT NULL;