This is an old revision of the document!
For the first time:
Each customer has own environment - e.g. sql server connections - and configuration. Before work, it's necessary to setup environment configuration for these particular customer.
There is database first approach.
Change data
Apply db changes into model and also into database local database
There are many 'databases'. Each 'database' has own database context in generated C# ORM models. Each such database and context has own directory e.g. DatabaseDD for data which are responsible for daily reports. It's possible that some database entities are in more such contexts. E.g. vehicles are in many databases. It's also possible include one context into another. There is DatabaseCore and most of other databases includes this 'core'.
When we made some changes in database table, stored procedure, view, which are in many 'databases', it's necessary to apply these changes to all these contexts and database classes.
Apply db changes:
Classes are generate according dcfg configurations via sqlmetal Microsoft tool.
deploy db changes to particular SQL server (testing, production):
Changes in database structure are made through update scripts. These are stored in db tables 'upgrades' tables e.g. 'DatabaseUpgrade' for core tables, KADatabaseUpgrade for database upgrades for KA database modules etc. These tables store information about every upgrade script and when it was called. When new database deployement is started, only these update scripts which aren't in these 'upgrades' tables are processed.
Some customers has very special database setup, see Customers paragraph.
Online Data
There is special fetching process in code. Sometimes it's necessary to add columns into online data database from the OnlineDataColumns table, it's processed via stored procedures
exec CreateOnlineDataColumn 'CentralBroom' exec CreateOnlineDataColumn 'LeftBroom'
It's recommended to use transactions for this execs. Each customer has own onlinedata database.