db.SchemaVersion

Jochen Kötter jochen-koetter at gmx.de
Sun Jun 17 12:21:34 CDT 2007


Hi Ruslan,

I read the articles about db.Schemaversion in the Wiki and working  
with API-classes would be:
1) to write an updateSchema_1_2  method
2) to write an UpdateSchema method
3) to write the OnDatabaseOpen -Method (by the way, where do I find  
this OnDatabaseOpenEvent ? Wiki Search "OnDatabaseOpen" has no matches )
4) to add the alteration of tables/fields to the subclasses of  
VDatabase and VTable
5) to change the DataModel-Classes

Imagine there would be a way to update a schema designed with API- 
Classes like this:
1) add the alteration of tables/fields to the properties of the  
DbSchema defining subclasses of VDatabase and VTable
2) to open of the Database with db.open( kForUpdate ): Valentina  
reads the tblCreateMethod and implements all stuff in the Database  
that does not exist yet.
3) to change the Datamodel Classes

Wouldn't this be a very nice classes way?

Greetings
Jochen Koetter



> On 16/6/07 9:56 AM, "Jochen Kötter" <jochen-koetter at gmx.de> wrote:
>
>>> For this exits db.SchemaVersion
>>
>> WOW !!   Ingenious! Could this be real?
>>
>> db = new dbPianoclass
>>  f   = GetFolderItem( "pianoclass" )
>>      db.open( f )
>>      db.SchemaVersion = db.SchemaVersion + 1
>>      db.flush
>>
>> Such an incredible easy way!
>
> Not exactly.
>
> Please use search on Valentina WIKI.
> Search gives me 5-6 found pages. E.g. this one with examples:
>
> http://www.valentina-db.com/dokuwiki/doku.php? 
> id=paradigma:public:en:documen
> tation:vkernel:database:schema_version&s=schemaversion
>
>
>> If this it is, you should specify this for other newcomers in the
>> reference document.
>> In Docu it looks like the db.Schemaversion would be only a  
>> possibility,
>> to read the Versionnumber, which could help to update the structure.
>
> Yes, this is just a counter, which you can check/change and do some  
> actions
>
>
>>> And I think V4RB/Examples/Class_way do have such example
>>
>> I didn't find it anywhere.
>>
>> Would you confirm wether this is the right way, please?
>
> Really there is no such example in V4RB...
> Should be added.
>
> -- 
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list