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
|
Stuff that needs to be done in sloecode, in no particular order:
----------------------------------------------------------------
* Make User & Project creation forms use AJAX to check if the user login or
project name already exists. It'd be nice to be able to do this with AJAX,
but we'd still need some sort of error checking on the process_foo controller
actions that had the ability to re-display the original form with suitable
error messages.
Database Migration:
We need to support database migration as we change the database over time. I
don't think there's any point in trying to detect database changes
automatically. Instead, I suggest the following be done to support database
migration:
1. keep a text file in the project root called DBVERSION. This file contains a
single number, which represents the database version number as it is in
trunk.
2. Every time we change the database schema, we write a simple python file that
contains a couple of SQL commands to update the database to the new version.
Most of the time the commands will be the same for different database
backends, so we can make it really simple - a single SQL string. When the
case is more complicated, we may need a string each for every supported
backend.
3. A script that gets run as part of the upgrade process, which checks the
version from DBVERSION, and checks the version from within the database, and
automatically applies every script required to update the database to the
current version.
Note that this script needs to be invoked both when the package is updated,
and every time the user gets a new version from source control.
Notes:
------
* Since we need to test upgrade SQL scripts against different backends, I suggest
we select which backends we want to support. At a minimum, we should support
MySQL and SQLite.
* It should be reasonably easy to write a script that grabs a version of the code
from bzr, creates the database, then grabs the latest version of the code and
runs the upgrade script. We could make this an automated process for the backends
we want to support.
|