File: 2020091000.sql

package info (click to toggle)
roundcube 1.6.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,880 kB
  • sloc: javascript: 195,591; php: 76,888; sql: 3,150; sh: 2,882; pascal: 1,079; makefile: 234; xml: 93; perl: 73; ansic: 48; python: 21
file content (19 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

CREATE SEQUENCE collected_addresses_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;

CREATE TABLE collected_addresses (
    address_id integer DEFAULT nextval('collected_addresses_seq'::text) PRIMARY KEY,
    user_id integer NOT NULL
        REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
    changed timestamp with time zone DEFAULT now() NOT NULL,
    name varchar(255) DEFAULT '' NOT NULL,
    email varchar(255) NOT NULL,
    "type" integer NOT NULL
);

CREATE UNIQUE INDEX collected_addresses_user_id_idx ON collected_addresses (user_id, "type", email);