]> Some of my projects - localmylist.git/commitdiff
Make id columns not null. Add a lid column for future use
authorAPTX <marek321@gmail.com>
Thu, 4 Apr 2013 12:01:16 +0000 (14:01 +0200)
committerAPTX <marek321@gmail.com>
Thu, 4 Apr 2013 12:01:16 +0000 (14:01 +0200)
localmylist/share/schema/schema.sql

index a61233aefb2c7f23aed444114fa4e4960162a7ae..f95f8a144d9db39d7df592886c123b4ea34773aa 100644 (file)
@@ -45,7 +45,7 @@ CREATE INDEX language_idx ON anime_title USING hash (language);
 
 CREATE TABLE episode (
        eid integer NOT NULL,
-       aid integer,
+       aid integer NOT NULL,
        entry_added timestamp without time zone NOT NULL DEFAULT now(),
        anidb_update timestamp without time zone,
        entry_update timestamp without time zone,
@@ -77,9 +77,10 @@ CREATE TABLE episode_type
 
 CREATE TABLE file (
        fid integer NOT NULL,
-       eid integer,
-       aid integer,
-       gid integer,
+       eid integer NOT NULL,
+       aid integer NOT NULL,
+       gid integer NOT NULL,
+       lid integer NOT NULL DEFAULT 0,
        entry_added timestamp without time zone NOT NULL DEFAULT now(),
        anidb_update timestamp without time zone,
        entry_update timestamp without time zone,