Add test infrastructure with Docker services, CLI tools, and resolve Phase 0 questions
Stand up local dev infrastructure (OPC UA, LDAP, MS SQL) with Docker Compose, Python CLI tools for service interaction, and teardown script. Fix GLAuth config mount, OPC PLC node format, and document actual DN/namespace behavior discovered during testing. Resolve Q1-Q8,Q10: .NET 10, Akka.NET 1.5.x, monorepo with slnx, appsettings JWT, Windows Server 2022 site target.
This commit is contained in:
36
infra/mssql/setup.sql
Normal file
36
infra/mssql/setup.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
-- ScadaLink development database setup
|
||||
-- Run against a fresh MS SQL 2022 instance.
|
||||
-- EF Core migrations handle schema creation; this script only creates
|
||||
-- the empty databases and the application login/user.
|
||||
|
||||
-- Create databases
|
||||
IF NOT EXISTS (SELECT name FROM sys.databases WHERE name = 'ScadaLinkConfig')
|
||||
CREATE DATABASE ScadaLinkConfig;
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT name FROM sys.databases WHERE name = 'ScadaLinkMachineData')
|
||||
CREATE DATABASE ScadaLinkMachineData;
|
||||
GO
|
||||
|
||||
-- Create application login
|
||||
IF NOT EXISTS (SELECT name FROM sys.server_principals WHERE name = 'scadalink_app')
|
||||
CREATE LOGIN scadalink_app WITH PASSWORD = 'ScadaLink_Dev1!', DEFAULT_DATABASE = ScadaLinkConfig;
|
||||
GO
|
||||
|
||||
-- Grant db_owner on ScadaLinkConfig
|
||||
USE ScadaLinkConfig;
|
||||
GO
|
||||
IF NOT EXISTS (SELECT name FROM sys.database_principals WHERE name = 'scadalink_app')
|
||||
CREATE USER scadalink_app FOR LOGIN scadalink_app;
|
||||
GO
|
||||
ALTER ROLE db_owner ADD MEMBER scadalink_app;
|
||||
GO
|
||||
|
||||
-- Grant db_owner on ScadaLinkMachineData
|
||||
USE ScadaLinkMachineData;
|
||||
GO
|
||||
IF NOT EXISTS (SELECT name FROM sys.database_principals WHERE name = 'scadalink_app')
|
||||
CREATE USER scadalink_app FOR LOGIN scadalink_app;
|
||||
GO
|
||||
ALTER ROLE db_owner ADD MEMBER scadalink_app;
|
||||
GO
|
||||
Reference in New Issue
Block a user