21 lines
711 B
Transact-SQL
21 lines
711 B
Transact-SQL
if not exists (select top 1 1 from sys.objects where name = 'Machine' and type = 'U')
|
|
begin
|
|
create table Machine
|
|
(
|
|
MachineId int identity(0, 1) constraint PK_Machine primary key,
|
|
MachineName varchar(50) not null,
|
|
FullMachineName varchar(100) not null,
|
|
MACAddress varchar(20) not null,
|
|
IPv4Address varchar(20),
|
|
[Description] varchar(max)
|
|
)
|
|
end
|
|
go
|
|
|
|
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***', null, 'Main file server'
|
|
end
|
|
go |