UPDATE TBDD_BASECONFIG SET DB_VERSION = '1.9.5.0'
CREATE TABLE TBDD_LANGUAGE
(
	GUID			TINYINT			NOT NULL	IDENTITY (1, 1),
	LANG_CODE		VARCHAR(10)	NOT NULL,
	CREATE_DEFAULT_ENTRY	BIT		NOT NULL	DEFAULT 0,
	COMMENT			VARCHAR(1000),
	ADDED_WHO	    VARCHAR(30)     NOT NULL    DEFAULT 'SYSTEM',
	ADDED_WHEN   	DATETIME 	    NOT NULL 	DEFAULT (GETDATE()),
	CHANGED_WHO     VARCHAR(30),
	CHANGED_WHEN	DATETIME,
	CONSTRAINT PK_TBDD_LANGUAGE 	   PRIMARY KEY (GUID),
	CONSTRAINT UQ_TBDD_LANGUAGE		UNIQUE (LANG_CODE)
)
GO
CREATE TRIGGER TBDD_LANGUAGE_AFT_UPD ON TBDD_LANGUAGE
FOR UPDATE
AS
  UPDATE TBDD_LANGUAGE SET CHANGED_WHEN = GETDATE()
  FROM INSERTED
  WHERE TBDD_LANGUAGE.GUID = INSERTED.GUID
GO
INSERT INTO TBDD_LANGUAGE (LANG_CODE,CREATE_DEFAULT_ENTRY) VALUES ('de-DE',1);
INSERT INTO TBDD_LANGUAGE (LANG_CODE,CREATE_DEFAULT_ENTRY) VALUES ('en-EN',1);
INSERT INTO TBDD_LANGUAGE (LANG_CODE,CREATE_DEFAULT_ENTRY) VALUES ('fr-FR',1);
GO