|
|
@ -65,8 +65,8 @@ CREATE SEQUENCE identity_ids
|
|
|
|
CREATE TABLE identities (
|
|
|
|
CREATE TABLE identities (
|
|
|
|
identity_id integer DEFAULT nextval('identity_ids'::text) PRIMARY KEY,
|
|
|
|
identity_id integer DEFAULT nextval('identity_ids'::text) PRIMARY KEY,
|
|
|
|
user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
|
|
user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
|
|
del integer DEFAULT 0 NOT NULL,
|
|
|
|
del smallint DEFAULT 0 NOT NULL,
|
|
|
|
standard integer DEFAULT 0 NOT NULL,
|
|
|
|
standard smallint DEFAULT 0 NOT NULL,
|
|
|
|
name character varying(128) NOT NULL,
|
|
|
|
name character varying(128) NOT NULL,
|
|
|
|
organization character varying(128),
|
|
|
|
organization character varying(128),
|
|
|
|
email character varying(128) NOT NULL,
|
|
|
|
email character varying(128) NOT NULL,
|
|
|
@ -100,7 +100,7 @@ CREATE TABLE contacts (
|
|
|
|
contact_id integer DEFAULT nextval('contact_ids'::text) PRIMARY KEY,
|
|
|
|
contact_id integer DEFAULT nextval('contact_ids'::text) PRIMARY KEY,
|
|
|
|
user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
|
|
user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
|
|
changed timestamp with time zone DEFAULT now() NOT NULL,
|
|
|
|
changed timestamp with time zone DEFAULT now() NOT NULL,
|
|
|
|
del integer DEFAULT 0 NOT NULL,
|
|
|
|
del smallint DEFAULT 0 NOT NULL,
|
|
|
|
name character varying(128) DEFAULT ''::character varying NOT NULL,
|
|
|
|
name character varying(128) DEFAULT ''::character varying NOT NULL,
|
|
|
|
email character varying(128) DEFAULT ''::character varying NOT NULL,
|
|
|
|
email character varying(128) DEFAULT ''::character varying NOT NULL,
|
|
|
|
firstname character varying(128) DEFAULT ''::character varying NOT NULL,
|
|
|
|
firstname character varying(128) DEFAULT ''::character varying NOT NULL,
|
|
|
@ -156,7 +156,7 @@ CREATE SEQUENCE message_ids
|
|
|
|
CREATE TABLE messages (
|
|
|
|
CREATE TABLE messages (
|
|
|
|
message_id integer DEFAULT nextval('message_ids'::text) PRIMARY KEY,
|
|
|
|
message_id integer DEFAULT nextval('message_ids'::text) PRIMARY KEY,
|
|
|
|
user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
|
|
user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
|
|
del integer DEFAULT 0 NOT NULL,
|
|
|
|
del smallint DEFAULT 0 NOT NULL,
|
|
|
|
cache_key character varying(128) DEFAULT ''::character varying NOT NULL,
|
|
|
|
cache_key character varying(128) DEFAULT ''::character varying NOT NULL,
|
|
|
|
created timestamp with time zone DEFAULT now() NOT NULL,
|
|
|
|
created timestamp with time zone DEFAULT now() NOT NULL,
|
|
|
|
idx integer DEFAULT 0 NOT NULL,
|
|
|
|
idx integer DEFAULT 0 NOT NULL,
|
|
|
|