[Ml-yokadi] project keywords

Sébastien Renard Sebastien.Renard
Dim 22 Mar 12:48:13 CET 2009


Le samedi 21 mars 2009 22:41:40, Aurélien Gâteau a écrit :
> I agree, having similar interfaces will make Yokadi easier to learn. Go
> ahead!

I made the big jump. We have now a version 3 database. But I did not manage to 
write the update script...
SQLObject is quite poorly documentated. I did not find a correct explanation 
of the addColumn method of sqlmeta.

Here's basically my update script:

def createProjectKeywordTable():
    ProjectKeyword.create()

def alterProjectTable():
    class Project(SQLObject):
        pass
    Project.sqlmeta.addColumn(RelatedJoin("Keyword",
                                          createRelatedTable=False,
                                          intermediateTable="project_keyword",
                                          joinColumn="project_id",
                                          otherColumn="keyword_id"), 
changeSchema=True)

I don't know how to set the column name (that should be "keywords"). AddColumn 
does not have a name parameter and the first attribute of RelatedJoin is the 
target name, not the column name... What a hell.

Do you see the light in this mess ?

Other things to do:
- our update mechanism is broken for people who "install" yokadi. I have to 
fix that
- I have to add p_edit 
- t_list must be updated to filter on project's keywords
- update p_list to display project keywords.

a+
-- 
Sébastien


Plus d'informations sur la liste de diffusion Ml-yokadi