Remove secrets from sql scripts
parent
60b8c75c96
commit
0920f0416d
|
@ -16,27 +16,12 @@
|
|||
<None Update="Scripts\1.0.0\01.Machine table.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Scripts\1.0.2\01.Added RPi machines.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Scripts\1.0.2\02.Added new RPi machines.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Scripts\1.0.1\01.Add ***REMOVED*** machine.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Scripts\1.0.3\01.Power actions configuration.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Scripts\1.0.3\02.Insert wake and ping configs for the rest of machines.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Scripts\1.0.3\03.Register Acer thin testing machine.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Scripts\1.0.3\04.***REMOVED*** config.sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -9,15 +9,4 @@ begin
|
|||
IPv4Address varchar(20),
|
||||
[Description] varchar(max)
|
||||
)
|
||||
end
|
||||
|
||||
if not exists (select top 1 1 from Machine)
|
||||
begin
|
||||
insert into Machine(MachineName, FullMachineName, MACAddress, IPv4Address, [Description])
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'Personal main development station' union
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'Proxmox node' union
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'Proxmox node' union
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'VMware ESXi Hypervisor' union
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'Main file server' union
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'OpenMediaVault Server'
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
if not exists (select top 1 1 from Machine where MachineName = '***REMOVED***')
|
||||
begin
|
||||
insert into Machine(MachineName, FullMachineName, MACAddress, IPv4Address, [Description])
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'Proxmox main node'
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
if not exists (select top 1 1 from Machine where MachineName = '***REMOVED***')
|
||||
begin
|
||||
insert into Machine(MachineName, FullMachineName, MACAddress, IPv4Address, [Description])
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'Raspberry Pi 3 Model B server'
|
||||
end
|
||||
|
||||
if not exists (select top 1 1 from Machine where MachineName = '***REMOVED***')
|
||||
begin
|
||||
insert into Machine(MachineName, FullMachineName, MACAddress, IPv4Address, [Description])
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'Raspberry Pi 2 Model B server'
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
if not exists (select top 1 1 from Machine where MachineName = '***REMOVED***')
|
||||
begin
|
||||
insert into Machine(MachineName, FullMachineName, MACAddress, IPv4Address, [Description])
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'Raspberry Pi 4 Model B/8GB'
|
||||
end
|
||||
|
||||
if not exists (select top 1 1 from Machine where MachineName = '***REMOVED***')
|
||||
begin
|
||||
insert into Machine(MachineName, FullMachineName, MACAddress, IPv4Address, [Description])
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'Raspberry Pi Zero W'
|
||||
end
|
|
@ -62,26 +62,4 @@ begin
|
|||
PowerActionId int constraint FK_PowerActionConfigurationn_PowerAction foreign key references PowerAction(PowerActionId),
|
||||
PerformerId int constraint FK_PowerActionConfiguration_PowerActionPerformer foreign key references PowerActionPerformer(PerformerId)
|
||||
)
|
||||
end
|
||||
|
||||
declare @orion_machine_id int, @server_performer_id int, @agent_performer_id int
|
||||
select @orion_machine_id = MachineId from Machine where MachineName = '***REMOVED***'
|
||||
select @server_performer_id = PerformerId from PowerActionPerformer where PerformerCode = 'NETWORK_RESURRECTOR_SERVER'
|
||||
select @agent_performer_id = PerformerId from PowerActionPerformer where PerformerCode = 'NETWORK_RESURRECTOR_AGENT'
|
||||
|
||||
if not exists (select top 1 1 from MachineAgent)
|
||||
begin
|
||||
insert into MachineAgent (MachineId, AgentPort)
|
||||
select @orion_machine_id, ***REMOVED***
|
||||
end
|
||||
|
||||
if not exists (select top 1 1 from PowerActionConfiguration)
|
||||
begin
|
||||
insert into PowerActionConfiguration (MachineId, PowerActionId, PerformerId)
|
||||
select @orion_machine_id,
|
||||
PowerActionId,
|
||||
case when PowerActionCode in ('WAKE', 'PING') then @server_performer_id
|
||||
else @agent_performer_id
|
||||
end
|
||||
from PowerAction
|
||||
end
|
|
@ -1,27 +0,0 @@
|
|||
if not exists (select top 1 1 from Machine where MachineName = '***REMOVED***')
|
||||
begin
|
||||
insert into Machine(MachineName, FullMachineName, MACAddress, IPv4Address, [Description])
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED*** - Acer thin testing machine'
|
||||
end
|
||||
|
||||
declare @machine_id int, @server_performer_id int, @agent_performer_id int
|
||||
select @machine_id = MachineId from Machine where MachineName = '***REMOVED***'
|
||||
select @server_performer_id = PerformerId from PowerActionPerformer where PerformerCode = 'NETWORK_RESURRECTOR_SERVER'
|
||||
select @agent_performer_id = PerformerId from PowerActionPerformer where PerformerCode = 'NETWORK_RESURRECTOR_AGENT'
|
||||
|
||||
if not exists (select top 1 1 from MachineAgent where MachineId = @machine_id)
|
||||
begin
|
||||
insert into MachineAgent (MachineId, AgentPort)
|
||||
select @machine_id, ***REMOVED***
|
||||
end
|
||||
|
||||
if not exists (select top 1 1 from PowerActionConfiguration where MachineId = @machine_id)
|
||||
begin
|
||||
insert into PowerActionConfiguration (MachineId, PowerActionId, PerformerId)
|
||||
select @machine_id,
|
||||
PowerActionId,
|
||||
case when PowerActionCode in ('WAKE', 'PING') then @server_performer_id
|
||||
else @agent_performer_id
|
||||
end
|
||||
from PowerAction
|
||||
end
|
|
@ -1,19 +0,0 @@
|
|||
if not exists (select top 1 1 from Machine where MachineName = '***REMOVED***')
|
||||
begin
|
||||
insert into Machine(MachineName, FullMachineName, MACAddress, IPv4Address, [Description])
|
||||
select '***REMOVED***', '***REMOVED***', '***REMOVED***', '***REMOVED***', 'The old ***REMOVED*** host and the first public server of the lab'
|
||||
end
|
||||
|
||||
declare @machine_id int, @server_performer_id int
|
||||
select @machine_id = MachineId from Machine where MachineName = '***REMOVED***'
|
||||
select @server_performer_id = PerformerId from PowerActionPerformer where PerformerCode = 'NETWORK_RESURRECTOR_SERVER'
|
||||
|
||||
if not exists (select top 1 1 from PowerActionConfiguration where MachineId = @machine_id)
|
||||
begin
|
||||
insert into PowerActionConfiguration (MachineId, PowerActionId, PerformerId)
|
||||
select @machine_id,
|
||||
PowerActionId,
|
||||
@server_performer_id
|
||||
from PowerAction
|
||||
where PowerActionCode in ('WAKE', 'PING')
|
||||
end
|
Loading…
Reference in New Issue