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