C# Class LayersCMS.Data.Persistence.Setup.DatabaseSchemaSetup

Constructs the database schema. Should only be run once, and access to run the code should be protected in the UI somehow, as this will drop and recreate all tables.
Mostra file Open project: stevekennaird/LayersCMS

Public Methods

Method Description
DatabaseSchemaSetup ( IHashHelper hashHelper ) : System
InitialiseDatabaseTables ( DatabaseSetupConfig config ) : void

Initialise the database for both the core tables and any bespoke layers (modules)

Private Methods

Method Description
InitialiseCoreTables ( DatabaseSetupConfig config, OrmLiteConnectionFactory dbFactory ) : void

Drops all tables matching the name of the LayersCmsDomainObjects to be created, then creates fresh tables for those domain objects.

InitialiseLayers ( OrmLiteConnectionFactory dbFactory ) : void

Create any database tables for any layers (e.g. a news layer/module)

Method Details

DatabaseSchemaSetup() public method

public DatabaseSchemaSetup ( IHashHelper hashHelper ) : System
hashHelper IHashHelper The hashing helper to hash the user's password
return System

InitialiseDatabaseTables() public method

Initialise the database for both the core tables and any bespoke layers (modules)
public InitialiseDatabaseTables ( DatabaseSetupConfig config ) : void
config DatabaseSetupConfig
return void