Re: [Planner Dev] Database schemas, versions and upgrading paths





Alvaro del Castillo wrote:



To do this we really need that "planner" table which I was thinking
about which contains....

	tables_dtd  (text field)



As richard, I think that we need to put here the version, not the DTD,
but I am sure lincoln has something in mind about the DTD in the
database.


no - richard is right - I was really after the table layout. I've just
replied back saying this needs to be tables_layout

Its sort of related to DTD but not exactly.



as well as the other things (tables_prefix etc). This would
contain the "0.11" text. Though we know what we mean I want to
avoid the word "schema" as its a postgres database term.



Hmmm, why we need table prefix_*? Maybe a need to look further to the
tables, but I think we can put a version for each project_id. If we open
a new version of planner it will find that versions in the database for
projects are older that the new sql file that comes with the new
planner, so planner will upgrade the database.



Then the mrp-storage-sql would read that table and retrieve the
tables_dtd and see if it was legal for it. It would also read
the tables_prefix to know what to prefix further table reads with ;)
e.g. "hostedplanner_" thus whereas today it just does a get on
"project" it would actually be a get on "hostedplanner_project".
As mentioned this was to avoid clashing or table name where you
are on a hosted environment and have just one database.



Sorry lincoln, the hosted environment what is exactly? Have you
described it in other email?

This is where you rent a server and you pay per postgres database
or the case where your company gives you one database. What you
need to do is therefore prefix each table so that it doesn't clash
with existing applications that you already have hosted inside that
one database.

To stop this possibility of a clash you prefix the table name
with something. Most/all database applications like the various
'nukes can do this.
......



But that'll come later - right now if we can simply create or
delete a database and upgrade an existing database via Planner
then that would be a great step forward for people.



This is my first target. Really the first thing is to create the tables
without user careing about it.

Yup, cool, thats what we're after !.


Cheers

-- Alvaro





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