james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin J. Chernov (JIRA)" <server-...@james.apache.org>
Subject [jira] [Created] (JAMES-1697) james_mail is being created incorrectly when using JPA and PostgreSQL due to final declarations
Date Tue, 01 Mar 2016 20:21:18 GMT
Konstantin J. Chernov created JAMES-1697:
--------------------------------------------

             Summary: james_mail is being created incorrectly when using JPA and PostgreSQL
due to final declarations
                 Key: JAMES-1697
                 URL: https://issues.apache.org/jira/browse/JAMES-1697
             Project: James Server
          Issue Type: Bug
            Reporter: Konstantin J. Chernov


Using GIT master of james.

Fields mail_bytes/header_bytes are absent in the declaration of james_mail when using PostgreSQL.

{code}
james=# \d james_mail
       Table "public.james_mail"
      Column      |  Type   | Modifiers 
------------------+---------+-----------
 mailbox_id       | bigint  | not null
 mail_uid         | bigint  | not null
 mail_is_answered | boolean | not null
 mail_is_deleted  | boolean | not null
 mail_is_draft    | boolean | not null
 mail_is_flagged  | boolean | not null
 mail_modseq      | bigint  | 
 mail_is_recent   | boolean | not null
 mail_is_seen     | boolean | not null
Indexes:
    "james_mail_pkey" PRIMARY KEY, btree (mailbox_id, mail_uid)
    "i_jms_mil_mail_is_deleted" btree (mail_is_deleted)
    "i_jms_mil_mail_is_recent" btree (mail_is_recent)
    "i_jms_mil_mail_is_seen" btree (mail_is_seen)
    "i_jms_mil_mail_modseq" btree (mail_modseq)
Foreign-key constraints:
    "james_mail_mailbox_id_fkey" FOREIGN KEY (mailbox_id) REFERENCES james_mailbox(mailbox_id)
ON DELETE CASCADE DEFERRABLE

james=# \c postgres
You are now connected to database "postgres" as user "postgres".
postgres=# drop database james;                                                          
                                                                                         
                 
DROP DATABASE
postgres=# create database james with owner james;                                       
                                                                   

<JAMES RESTART>

postgres=# \c james
You are now connected to database "james" as user "postgres".
james=# \d james_mail
       Table "public.james_mail"
      Column      |  Type   | Modifiers 
------------------+---------+-----------
 mailbox_id       | bigint  | not null
 mail_uid         | bigint  | not null
 mail_is_answered | boolean | not null
 mail_is_deleted  | boolean | not null
 mail_is_draft    | boolean | not null
 mail_is_flagged  | boolean | not null
 mail_modseq      | bigint  | 
 mail_is_recent   | boolean | not null
 mail_is_seen     | boolean | not null
 mail_bytes       | integer | not null
 header_bytes     | integer | not null
Indexes:
    "james_mail_pkey" PRIMARY KEY, btree (mailbox_id, mail_uid)
    "i_jms_mil_mail_is_deleted" btree (mail_is_deleted)
    "i_jms_mil_mail_is_recent" btree (mail_is_recent)
    "i_jms_mil_mail_is_seen" btree (mail_is_seen)
    "i_jms_mil_mail_modseq" btree (mail_modseq)
Foreign-key constraints:
    "james_mail_mailbox_id_fkey" FOREIGN KEY (mailbox_id) REFERENCES james_mailbox(mailbox_id)
ON DELETE CASCADE DEFERRABLE
                                      
{code}

The problem was caused by commit 9b2ce5de97244d21bea6e0fd857f5541d540c8be, after I changed
*private final InputStream header/body* to just *private InputStream header/body*, the table
has been created correctly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message