4 Replies Latest reply on Jan 26, 2004 6:06 PM by Viet

    DDL corrections for Nukes 1.0RC1 with PostgreSQL

    C. Daniel Mojoli-Boggino Newbie

       

      "cdmojoli" wrote:
      Even though we have both MySQL and PostgreSQL, we strongly prefer the latter. However, the DDL for PostgreSQL in Nukes 1.0RC1 has the following mistakes (and possibly more, although I haven't tested it thoroughly enough).

      The first hunk affects a nuke_users column, incorrectly mapped to SMALLINT.

      The second hunk affects nuke_file, relaxing the not null requirement so that ejbCreate INSERT can succeed (which is prior to setting the fk in ejbPostCreate's UPDATE).

      Without this patch you will be unable to manage html or create new users.

      I will post further corrections if I find any more problems. Excellent work though.

      --- setup.ddl Mon Dec 29 14:44:27 2003
      +++ setup.corrected.ddl Mon Dec 29 21:16:02 2003
      @@ -23,7 +23,7 @@
       pn_pass VARCHAR(40) NOT NULL DEFAULT '',
       pn_theme VARCHAR(255) NOT NULL DEFAULT '',
       pn_umode VARCHAR(10) NOT NULL DEFAULT '',
      - pn_uorder SMALLINT NOT NULL DEFAULT 0,
      + pn_uorder BOOLEAN NOT NULL DEFAULT false,
       pn_thold SMALLINT NOT NULL DEFAULT 0,
       pn_noscore BOOLEAN NOT NULL DEFAULT false,
       pn_commentmax INTEGER NOT NULL DEFAULT 4096,
      @@ -56,7 +56,7 @@
       CREATE TABLE nuke_file (
       pn_id SERIAL NOT NULL PRIMARY KEY,
       pn_fid VARCHAR(255) NOT NULL,
      - pn_uid INTEGER NOT NULL,
      + pn_uid INTEGER,
       pn_content_type VARCHAR(50) NOT NULL,
       pn_content BYTEA NOT NULL,
       pn_timest TIMESTAMP NOT NULL,