summaryrefslogtreecommitdiff
path: root/rt/etc/upgrade/3.1.0/schema.Pg
blob: 08a964c4b9f07530fa57663dee7950bdd0c7c12c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25


CREATE SEQUENCE attributes_id_seq;

CREATE TABLE Attributes (
  id INTEGER DEFAULT nextval('attributes_id_seq'),
  Name varchar(255) NOT NULL  ,
  Description varchar(255) NULL  ,
  Content text,
  ContentType varchar(16),
  ObjectType varchar(64),
  ObjectId integer, 
  Creator integer NOT NULL DEFAULT 0  ,
  Created TIMESTAMP NULL  ,
  LastUpdatedBy integer NOT NULL DEFAULT 0  ,
  LastUpdated TIMESTAMP NULL  ,
  PRIMARY KEY (id)

);

CREATE INDEX Attributes1 on Attributes(Name);
CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);