Re: [Planner Dev] Planner database version





Alvaro del Castillo wrote:



I think I will follow the new table approach but, what do you think?

Yup I vote for new table. Here is what I was thinking about.....

CREATE TABLE planner (
tables_planner text DEFAULT 'PLANNER' NOT NULL,
tables_version text,
tables_old_version text,
tables_convert_date date,
tables_convert_user text)
tables_prefix text DEFAULT '' NOT NULL;
ALTER TABLE planner ADD CONSTRAINT planner_pkey PRIMARY KEY( tables_planner );

or something like that. We should be unique just on the
tables_planner. OK - how this works. The Planner needs to query
this table where tables_planner is equal to "PLANNER". It then
gets back a single record which happens to have the details
it needs.

Ideally also if you pick up the tables_prefix and then prefix
all table names within planner with that e.g. if the table you wanted
is project but you had it stored as dev_project then set the tables
prefix to "dev_"

That way you can actually hold completely different versions of
the database structures which makes testing very nice.

Rgds,
Lincoln.


http://cvs.gnome.org/viewcvs/planner/data/sql/database-0.11.sql?rev=1.1&view=auto (database tables)

Cheers

-- Alvaro


------------------------------------------------------------------------

_______________________________________________
Planner-dev mailing list
Planner-dev lists imendio com
http://lists.imendio.com/mailman/listinfo/planner-dev



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