diff --git a/site_verify.install b/site_verify.install index 67c9f61..1949b47 100644 --- a/site_verify.install +++ b/site_verify.install @@ -113,8 +113,6 @@ function site_verify_update_3() { function site_verify_update_4() { // Update database schema. db_drop_field('site_verify', 'svid'); - db_add_field('site_verify', 'svid', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '', 'description' => 'Primary Key: Unique site verification ID.'), array('primary key' => array('svid'))); - db_add_field('site_verify', 'label', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')); $engines = site_verify_get_engines(); $verifications = db_select('site_verify', 'sv') @@ -123,6 +121,9 @@ function site_verify_update_4() { ->fetchAll(); db_delete('site_verify')->execute(); + db_add_field('site_verify', 'svid', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '', 'description' => 'Primary Key: Unique site verification ID.'), array('primary key' => array('svid'))); + db_add_field('site_verify', 'label', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')); + // Re-create verification records. foreach ($verifications as $delta => $verification) { $verification->svid = "{$verification->engine}_{$delta}";