Serial columns now 64 bits.
authorrich <rich>
Thu, 17 Nov 2005 10:14:42 +0000 (10:14 +0000)
committerrich <rich>
Thu, 17 Nov 2005 10:14:42 +0000 (10:14 +0000)
scripts/create_contact.ml
scripts/edit_page_css.ml
scripts/lib/cocanwiki_create_host.ml
scripts/lib/cocanwiki_pages.ml
scripts/mail_import.ml
scripts/restore.ml
scripts/signup.ml

index 61eebeb..d31be0d 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: create_contact.ml,v 1.3 2005/03/31 14:24:04 rich Exp $
+ * $Id: create_contact.ml,v 1.4 2005/11/17 10:14:42 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
                                 values (?, ?, ?)" in
   sth#execute [`Int hostid; `String name; `String subject];
 
-  let contactid = sth#serial "contacts_id_seq" in
+  let contactid = Int64.to_int (sth#serial "contacts_id_seq") in
 
   let sth = dbh#prepare_cached "insert into contact_emails (contactid, email)
                                 values (?, ?)" in
index ab29fa0..4338bc4 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_page_css.ml,v 1.16 2005/03/31 14:24:04 rich Exp $
+ * $Id: edit_page_css.ml,v 1.17 2005/11/17 10:14:42 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -79,7 +79,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user =
   sth#execute [`Int hostid; `String page; title; description;
               creation_date; logged_ip; logged_user; redirect; css ];
 
-  let pageid = sth#serial "pages_id_seq" in
+  let pageid = Int64.to_int (sth#serial "pages_id_seq") in
 
   let sth = dbh#prepare_cached "insert into contents (pageid, ordering,
                                        sectionname, content, divname)
index cfc1819..b72b543 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: cocanwiki_create_host.ml,v 1.1 2004/10/21 11:42:05 rich Exp $
+ * $Id: cocanwiki_create_host.ml,v 1.2 2005/11/17 10:14:43 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ let create_host dbh canonical_hostname hostnames template
                                   values (?)" in
   sth#execute [`String canonical_hostname];
 
-  let hostid = sth#serial "hosts_id_seq" in
+  let hostid = Int64.to_int (sth#serial "hosts_id_seq") in
 
   let sth = dbh#prepare_cached "insert into hostnames (hostid, name)
                                   values (?, ?)" in
index 24e2291..f713277 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: cocanwiki_pages.ml,v 1.3 2004/11/22 11:07:32 rich Exp $
+ * $Id: cocanwiki_pages.ml,v 1.4 2005/11/17 10:14:43 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -155,7 +155,7 @@ let save_page (dbh : Dbi.connection) hostid ?user ?r model =
                   `String model.description; logged_ip; logged_user;
                   redirect];
 
-      let pageid = sth#serial "pages_id_seq" in
+      let pageid = Int64.to_int (sth#serial "pages_id_seq") in
 
       (* Create the page contents. *)
       let sth = dbh#prepare_cached "insert into contents (pageid,
@@ -246,7 +246,7 @@ let save_page (dbh : Dbi.connection) hostid ?user ?r model =
                   logged_user; redirect; css];
 
       (* New page ID <> old page ID model.id. *)
-      let pageid = sth#serial "pages_id_seq" in
+      let pageid = Int64.to_int (sth#serial "pages_id_seq") in
 
       (* Create the page contents. *)
       let sth = dbh#prepare_cached "insert into contents (pageid,
index 289e701..008d991 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: mail_import.ml,v 1.7 2004/12/01 13:55:55 rich Exp $
+ * $Id: mail_import.ml,v 1.8 2005/11/17 10:14:42 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -172,7 +172,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ user =
                  message_date) values (?, ?, ?, ?)" in
          sth#execute [`Int hostid; `String subject; `String inet_message_id;
                       `Timestamp (date, time)];
-         let msgid = sth#serial "messages_id_seq" in
+         let msgid = Int64.to_int (sth#serial "messages_id_seq") in
 
          let sth =
            dbh#prepare_cached
index ed7f383..8fdaf85 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: restore.ml,v 1.16 2004/11/01 12:57:53 rich Exp $
+ * $Id: restore.ml,v 1.17 2005/11/17 10:14:42 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -77,7 +77,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user =
     sth#execute [`Int hostid; `String page; title; description;
                 creation_date; logged_ip; logged_user; redirect; css ];
 
-    let pageid = sth#serial "pages_id_seq" in
+    let pageid = Int64.to_int (sth#serial "pages_id_seq") in
 
     let sth = dbh#prepare_cached "insert into contents (pageid, ordering,
                                          sectionname, content, divname)
index 315c153..84a44aa 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: signup.ml,v 1.7 2005/03/31 14:24:04 rich Exp $
+ * $Id: signup.ml,v 1.8 2005/11/17 10:14:42 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -88,7 +88,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
                                 values (?, ?, ?, ?)" in
   sth#execute [`String username; `String password; email; `Int hostid];
 
-  let userid = sth#serial "users_id_seq" in
+  let userid = Int64.to_int (sth#serial "users_id_seq") in
 
   (* Create a cookie. *)
   let cookie = random_sessionid () in