koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] new database update mecanism


From: Pierrick LE GALL
Subject: [Koha-devel] new database update mecanism
Date: Tue, 21 Mar 2006 17:45:25 +0100

Hello koha-devel,

Last week, I explained on #koha I wanted to propose a new database
update mecanism [1]. Here is my proposal, I would like some feedbacks
before coding...

The idea is to simplify communication between developers on database
update (data and/or structure). Here follow the main points of the
mecanism:

- isolated updates that can be executed only once
- database self aware about its update level
- notification in intranet screen that new updates are available

A script update/updater.pl is run from the command line. The steps are:

1. list updates already executed (reading table "updates")

2. list available updates (numeric filenames in update/updates
   directory)

3. execute available updates that have not been executed yet

These are the basics.

updater.pl will first say if there are updates to execute. For example:

$ updater.pl
> 2 updates are missing, choose an option:
> 
> 1. list update details
> 2. execute all
> 3. execute one by one
> 
> [1] ?

updater.pl will write a log on each call.

Update files will be Perl files in the update/updates dedicated
directory, with numeric only filenames:

$ ls -v1 updates
> 1
> 2
> 2.1
> 10

About numerotation of updates, on HEAD, updates are named with a single
number (1, 2, 10...), on a branch like rel_2_2, updates are named with
the last update number on HEAD point a number wich starts to 1 on
rel_2_2. Just as an example, we could have:

                +------+
                | HEAD |
                +------+
                    |
                    |      +---------+
                    |      | rel_2_2 |
              43 => |      +---------+
              44 => |           |
                    +-----------+
                    |           | <= 44.1
                    |           |
              45 => |           |
                    |           | <= 44.2
              46 => |           |
                    |           |
                    |           | <= 44.3
                    |           |
              47 => |           |
                    |           |
                    |           |
                    |           |
              48 => |           | <= 44.4
                    |           | <= 44.5
              49 => |           
                    |
              50 => |
                    |      +---------+
              51 => |      | rel_3_0 |
              52 => |      +---------+
              53 => |           |
                    +-----------+
              54 => |           | <= 53.1
                    |           |
              55 => |           | <= 53.2
                    |           |
                    |           |
                    |           | <= 53.3
                    |           

Now, let's give me your feedback please :-)

[1] http://tinyurl.com/ep6nx

Cheers,

-- 
Pierrick LE GALL
INEO media system




reply via email to

[Prev in Thread] Current Thread [Next in Thread]