From 0d4d0c791195b4990f663997dc1ecdce7bc2e679 Mon Sep 17 00:00:00 2001
From: CiaranG <ciaran@ciarang.com>
Date: Mon, 29 Sep 2008 02:02:27 -0400
Subject: PostgreSQL: Put a default on confirm_address.address_extra to mimic
 mysql's behaviour when a not-null field is not set in a new record

darcs-hash:20080929060227-f6e2c-5996ad74cb5c89052417e36634a22b6e219bd92d.gz
---
 db/laconica_pg.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'db/laconica_pg.sql')

diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql
index 24ba0a99a..8d0db9a80 100644
--- a/db/laconica_pg.sql
+++ b/db/laconica_pg.sql
@@ -218,7 +218,7 @@ create table confirm_address (
     code varchar(32) not null primary key /* comment 'good random code' */,
     user_id integer not null /* comment 'user who requested confirmation' */ references "user" (id),
     address varchar(255) not null /* comment 'address (email, Jabber, SMS, etc.)' */,
-    address_extra varchar(255) not null /* comment 'carrier ID, for SMS' */,
+    address_extra varchar(255) not null default '' /* comment 'carrier ID, for SMS' */,
     address_type varchar(8) not null /* comment 'address type ("email", "jabber", "sms")' */,
     claimed timestamp /* comment 'date this was claimed for queueing' */,
     sent timestamp /* comment 'date this was sent for queueing' */,
-- 
cgit v1.2.3-54-g00ecf

