Angefangen tblCharacter zu schreiben

This commit is contained in:
Mario Wuensch 2021-09-23 15:56:01 +02:00
parent 5c596af77f
commit 7415379d03

View file

@ -0,0 +1,91 @@
/* ************************************************************************* *
*
* Datei: tblCharacter.sql
*
* Aufgabe: Tabelle tblCharacter anlegen
*
* Aenderungen:
* 2021-09-23, MWN, erstellt.
*
* ************************************************************************* */
if not exists (select * from sys.tables where object_id = object_id (N'tblCharacter')) begin
-- Protokollausgabe
print 'Anlegen der Tabelle <' + db_name() + '.dbo.tblCharacter>'
-- drop table tblCharacter
create table tblCharacter (
-- Primaerschluessel
constraint [PK_tblCharacter] primary key ([key])
, [key] int identity(1, 1) not null
-- ----------------------------------------------------------------------
-- Allgemeine Parameter
-- ----------------------------------------------------------------------
, [created] DateTime NOT NULL
, [lastModified] DateTime NOT NULL
-- ----------------------------------------------------------------------
-- Parameter
-- ----------------------------------------------------------------------
, [playerLink] int NOT NULL
, [name] nvarchar(250) NOT NULL
, [classLink] int NOT NULL
, [level] int NOT NULL
, [raceLink] int NOT NULL
, [alignmentLink] int NOT NULL
, [deityLink] int NOT NULL
, [sizeLink] int NOT NULL
, [age] int NOT NULL
, [gender] nvarchar(250) NOT NULL
, [height] decimal NOT NULL
, [weight] decimal NOT NULL
, [eyes] nvarchar(250) NOT NULL
, [hair] nvarchar(250) NOT NULL
, [skin] nvarchar(250) NOT NULL
, [strength] int NOT NULL
, [dexterity] int NOT NULL
, [constitution] int NOT NULL
, [intelligence] int NOT NULL
, [wisdom] int NOT NULL
, [charisma] int NOT NULL
, [strengthtemp] int NOT NULL
, [dexteritytemp] int NOT NULL
, [constitutiontemp] int NOT NULL
, [intelligencetemp] int NOT NULL
, [wisdomtemp] int NOT NULL
, [charismatemp] int NOT NULL
, [Fort] int NOT NULL
, [ref] int NOT NULL
, [will] int NOT NULL
, [baseAttack] int NOT NULL
, [hp] int NOT NULL
, [tempHp] int NOT NULL
, [nonLethalDmg] int NOT NULL
, [speed] int NOT NULL
, [dmgReduction] int NOT NULL
, [miscIni] int NOT NULL
)
if not exists (select * from sys.tables where object_id = object_id ('tblCharacter')) begin
print ''
print '************************************'
print 'Fehler beim Erstellen der Tabelle tblCharacter'
print '************************************'
print ''
end
end /*else begin -- [if not exists (Tabelle)...]
-- Hinzufuegen einer Spalte
if not exists (select * from syscolumns where name = 'nSeqDataXLink' and id = object_id('tblCharacter') and objectproperty(id, N'IsUserTable') = 1) begin
print 'alter table tblCharacter add nSeqDataXLink bigint null'
alter table tblCharacter add nSeqDataXLink bigint null
end
end -- [if not exists (Tabelle)...]*/
go
-- :EOF: