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

index a61233a..f95f8a1 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,