From 7415379d03f3aad49a7498202692de8360ac3695 Mon Sep 17 00:00:00 2001 From: Mario Wuensch Date: Thu, 23 Sep 2021 15:56:01 +0200 Subject: [PATCH] Angefangen tblCharacter zu schreiben --- SQL/tables/tblCharacter.sql | 91 +++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 SQL/tables/tblCharacter.sql diff --git a/SQL/tables/tblCharacter.sql b/SQL/tables/tblCharacter.sql new file mode 100644 index 0000000..a21c70e --- /dev/null +++ b/SQL/tables/tblCharacter.sql @@ -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: