3 CREATE TABLE Attributes (
4 id INTEGER NOT NULL AUTO_INCREMENT,
5 Name varchar(255) NULL ,
6 Description varchar(255) NULL ,
8 ContentType varchar(16),
9 ObjectType varchar(64),
10 ObjectId integer, # foreign key to anything
11 Creator integer NOT NULL DEFAULT 0 ,
12 Created DATETIME NULL ,
13 LastUpdatedBy integer NOT NULL DEFAULT 0 ,
14 LastUpdated DATETIME NULL ,
18 CREATE INDEX Attributes1 on Attributes(Name);
19 CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);