OpenSim::Data::Migration Class Reference

The Migration theory is based on the ruby on rails concept. Each database driver is going to be allowed to have files in Resources that specify the database migrations. They will be of the form:. More...

Inheritance diagram for OpenSim::Data::Migration:

OpenSim::Data::MSSQL::MSSQLMigration List of all members.

Public Member Functions

 Migration (DbConnection conn, Assembly assem, string type)
 Migration (DbConnection conn, Assembly assem, string subtype, string type)
void Update ()

Protected Member Functions

virtual int FindVersion (DbConnection conn, string type)

Properties

int Version [get, set]

Detailed Description

The Migration theory is based on the ruby on rails concept. Each database driver is going to be allowed to have files in Resources that specify the database migrations. They will be of the form:.

001_Users.sql 002_Users.sql 003_Users.sql 001_Prims.sql 002_Prims.sql ...etc...

When a database driver starts up, it specifies a resource that needs to be brought up to the current revision. For instance:

Migration um = new Migration(Assembly, DbConnection, "Users"); um.Upgrade();

This works out which version Users is at, and applies all the revisions past it to it. If there is no users table, all revisions are applied in order. Consider each future migration to be an incremental roll forward of the tables in question.

Assembly must be specifically passed in because otherwise you get the assembly that Migration.cs is part of, and what you really want is the assembly of your database class.


Constructor & Destructor Documentation

OpenSim::Data::Migration::Migration ( DbConnection  conn,
Assembly  assem,
string  type 
) [inline]

OpenSim::Data::Migration::Migration ( DbConnection  conn,
Assembly  assem,
string  subtype,
string  type 
) [inline]


Member Function Documentation

void OpenSim::Data::Migration::Update (  )  [inline]

virtual int OpenSim::Data::Migration::FindVersion ( DbConnection  conn,
string  type 
) [inline, protected, virtual]

Reimplemented in OpenSim::Data::MSSQL::MSSQLMigration.


Property Documentation

int OpenSim::Data::Migration::Version [get, set]


The documentation for this class was generated from the following file:
Generated on Mon Jan 5 01:00:38 2009 for OpenSim by  doxygen 1.5.1