Index: includes/database/sqlite/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/sqlite/schema.inc,v
retrieving revision 1.20
diff -u -p -r1.20 schema.inc
--- includes/database/sqlite/schema.inc	22 Oct 2010 15:18:56 -0000	1.20
+++ includes/database/sqlite/schema.inc	22 Dec 2010 05:11:05 -0000
@@ -276,7 +276,7 @@ class DatabaseSchema_sqlite extends Data
     return TRUE;
   }
 
-  public function addField($table, $field, $spec, $keys_new = array()) {
+  public function addField($table, $field, $specification, $keys_new = array()) {
     if (!$this->tableExists($table)) {
       throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add field %table.%field: table doesn't exist.", array('%field' => $field, '%table' => $table)));
     }
@@ -285,9 +285,23 @@ class DatabaseSchema_sqlite extends Data
     }
 
     // TODO: $keys_new is not supported yet.
+    $fix_null = FALSE;
+    if (!empty($specification['not null']) && !isset($specification['default'])) {
+      $fix_null = TRUE;
+      $specification['not null'] = FALSE;
+    }
     $query = 'ALTER TABLE {' . $table . '} ADD ';
-    $query .= $this->createFieldSql($field, $this->processField($spec));
+    $query .= $this->createFieldSql($field, $this->processField($specification));
     $this->connection->query($query);
+    if (isset($specification['initial'])) {
+      $this->connection->update($table)
+        ->fields(array($field => $specification['initial']))
+        ->execute();
+    }
+    if ($fix_null) {
+      $specification['not null'] = TRUE;
+      $this->changeField($table, $field, $field, $specification);
+    }
   }
 
   /**
