﻿There are 9+ scripts you’ll need to run to create a DNS3 database in the following order:
0)  Create a database (e.g., DNS3).
1)  DNS3_a_BaseStructure.sql  - Creates a new database called DNS3 with all objects required to run DNS.
2)  DNS3_b_BaseData.sql – Loads the DNS3 database with minimal “Root” group, organization, two DataMarts, and base users for each pre-defined Role.
3)  DNS3_c_ICD9Codes.sql  - Loads the DNS3 database with ICD9 and drug code sets (takes about 15 mins to run).  This is an optional scripts required for requests use the Code Selector.
4)  DNS4_a_Diff.sql - Loads migration views that map DNS2 schema to DNS3 schema
5)  /RedirectBridge/Lpp.Dns.RedirectBridge/Data/DDL.sql – Loads structures required for the redirected-based plugins (located in the Redirect/Lpp.Dns.RedriectBridge/Data folder)
6)  /Lpp.Mvc.Composition/Lpp.Security/Data/DAG.sql - Access control membership and inheritance storage
7)  /Lpp.Mvc.Composition/Lpp.Security/Data/DDL.sql – Access control schema
8)  /Lpp.Mvc.Composition/Lpp.Security/Data/TupleViews.sql – Autogenerated SQL views for access control system
9)  /Lpp.Mvc.Composition/Lpp.Audit/Data/DDL.sql - Audit subsystem schema
10) DNS4_c_SecInitialize.sql - (re)initializes access control data to make SystemAdministrator able to "Manage Security" on "Portal" - and nothing else!
11) All scripts from the /migrations folder, in order of their name prefixes