     ORDER BY pc.credit, a.surname;
 
 CREATE TABLE related_series (
-    id                serial  PRIMARY KEY,
-    series_id         integer NOT NULL REFERENCES book_series,
-    related_series_id integer NOT NULL REFERENCES book_series,
-    relation          integer NOT NULL
+    id                serial PRIMARY KEY,
+    series_id         int    NOT NULL REFERENCES book_series,
+    related_series_id int    NOT NULL REFERENCES book_series,
+    relation          int    NOT NULL
 );
 
 CREATE VIEW related_series_view AS

CREATE TABLE user_activations (
    id          serial      PRIMARY KEY,
    hash        text        NOT NULL,
    user_id     integer     NOT NULL REFERENCES users,
    expire_date timestamptz NOT NULL DEFAULT now() + '24 hours',
    expired     boolean     NOT NULL DEFAULT false
);

CREATE TABLE sessions (
    id          bytea       NOT NULL,
    user_id     integer     NOT NULL REFERENCES users,
    expire_date timestamptz NOT NULL DEFAULT 'epoch'::timestamptz
);



CREATE TABLE feeds (
    id           serial      PRIMARY KEY,
    input_kind   int         NOT NULL,
    output_kind  int         NOT NULL,
    kind         text        NOT NULL,        -- Release, series, article, etc. Display format.
    ref          text        NOT NULL UNIQUE, -- A random string of bytes that identifies this feed (don't use the id)
    include      int[]       NOT NULL,
    exclude      int[]       NOT NULL DEFAULT '{}',
    creator      int         REFERENCES users,
    title        text        NOT NULL,
    description  text        NOT NULL DEFAULT '',
    date_created timestamptz NOT NULL DEFAULT now()
