 --
 
 CREATE TABLE filtered_groups (
-    id       serial  PRIMARY KEY,
-    user_id  integer NOT NULL REFERENCES users,
-    group_id integer NOT NULL REFERENCES translation_groups
+    id       serial PRIMARY KEY,
+    user_id  int    NOT NULL REFERENCES users,
+    group_id int    NOT NULL REFERENCES translation_groups
 );
 
 CREATE TABLE filtered_languages (
-    id       serial  PRIMARY KEY,
-    user_id  integer NOT NULL REFERENCES users,
-    language text    NOT NULL
+    id       serial PRIMARY KEY,
+    user_id  int    NOT NULL REFERENCES users,
+    language text   NOT NULL
 );
 
 CREATE TABLE filtered_book_tags (
-    id      serial  PRIMARY KEY,
-    user_id integer NOT NULL REFERENCES users,
-    tag_id  integer NOT NULL REFERENCES book_tag_names
+    id      serial PRIMARY KEY,
+    user_id int    NOT NULL REFERENCES users,
+    tag_id  int    NOT NULL REFERENCES book_tag_names
 );
 
 CREATE TABLE filtered_character_tags (
-    id      serial  PRIMARY KEY,
-    user_id integer NOT NULL REFERENCES users,
-    tag_id  integer NOT NULL REFERENCES character_tag_names
+    id      serial PRIMARY KEY,
+    user_id int    NOT NULL REFERENCES users,
+    tag_id  int    NOT NULL REFERENCES character_tag_names
 );
 
 --

-- update the object of a series relation
CREATE FUNCTION do_update_series_relations() RETURNS trigger AS $$
    DECLARE
        related_relation integer;
    BEGIN
        IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN
            CASE NEW.relation


CREATE TABLE news_posts (
    id          serial      PRIMARY KEY,
    user_id     int         NOT NULL REFERENCES users,
    category_id int         NOT NULL REFERENCES news_categories,
    date_posted timestamptz NOT NULL DEFAULT now(),
    title       text        NOT NULL,
    body        text        NOT NULL
