diff --git a/xmlsitemap.install b/xmlsitemap.install
index 8124922..d954d2d 100644
--- a/xmlsitemap.install
+++ b/xmlsitemap.install
@@ -393,108 +393,7 @@ function xmlsitemap_update_6198() {
 
   if (db_column_exists('xmlsitemap', 'sid')) {
     db_drop_table($ret, 'xmlsitemap');
-
-    $schema['xmlsitemap'] = array(
-      'description' => 'The base table for xmlsitemap links.',
-      'fields' => array(
-        'id' => array(
-          'description' => 'Primary key with type; a unique id for the item.',
-          'type' => 'int',
-          'not null' => TRUE,
-          'unsigned' => TRUE,
-          'default' => 0,
-        ),
-        'type' => array(
-          'description' => 'Primary key with id; the type of item (e.g. node, user, etc.).',
-          'type' => 'varchar',
-          'length' => 32,
-          'not null' => TRUE,
-          'default' => '',
-        ),
-        'subtype' => array(
-          'description' => 'A sub-type identifier for the link (node type, menu name, term VID, etc.).',
-          'type' => 'varchar',
-          'length' => 128,
-          'not null' => TRUE,
-          'default' => '',
-        ),
-        'loc' => array(
-          'description' => 'The URL to the item relative to the Drupal path.',
-          'type' => 'varchar',
-          'length' => 255,
-          'not null' => TRUE,
-          'default' => '',
-        ),
-        'language' => array(
-          'description' => 'The {languages}.language of this link or an empty string if it is language-neutral.',
-          'type' => 'varchar',
-          'length' => 12,
-          'not null' => TRUE,
-          'default' => '',
-        ),
-        'access' => array(
-          'description' => 'A boolean that represents if the item is viewable by the anonymous user. This field is useful to store the result of node_access() so we can retain changefreq and priority_override information.',
-          'type' => 'int',
-          'size' => 'tiny',
-          'not null' => TRUE,
-          'default' => 1,
-        ),
-        'status' => array(
-          'description' => 'An integer that represents if the item is included in the sitemap.',
-          'type' => 'int',
-          'size' => 'tiny',
-          'not null' => TRUE,
-          'default' => 1,
-        ),
-        'status_override' => array(
-          'description' => 'A boolean that if TRUE means that the status field has been overridden from its default value.',
-          'type' => 'int',
-          'size' => 'tiny',
-          'not null' => TRUE,
-          'default' => 0,
-        ),
-        'lastmod' => array(
-          'description' => 'The UNIX timestamp of last modification of the item.',
-          'type' => 'int',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => 0,
-        ),
-        'priority' => array(
-          'description' => 'The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0.',
-          'type' => 'float',
-          'default' => NULL,
-        ),
-        'priority_override' => array(
-          'description' => 'A boolean that if TRUE means that the priority field has been overridden from its default value.',
-          'type' => 'int',
-          'size' => 'tiny',
-          'not null' => TRUE,
-          'default' => 0,
-        ),
-        'changefreq' => array(
-          'description' => 'The average time in seconds between changes of this item.',
-          'type' => 'int',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => 0,
-        ),
-        'changecount' => array(
-          'description' => 'The number of times this item has been changed. Used to help calculate the next changefreq value.',
-          'type' => 'int',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => 0,
-        ),
-      ),
-      'primary key' => array('id', 'type'),
-      'indexes' => array(
-        'loc' => array('loc'),
-        'access_status_loc' => array('access', 'status', 'loc'),
-        'type_subtype' => array('type', 'subtype'),
-        'language' => array('language'),
-      ),
-    );
+    $schema = xmlsitemap_schema();
     db_create_table($ret, 'xmlsitemap', $schema['xmlsitemap']);
     db_query("INSERT INTO {xmlsitemap} (type, id, loc, priority, changefreq) VALUES ('frontpage', 0, '', %f, %d)", variable_get('xmlsitemap_frontpage_priority', 1.0), variable_get('xmlsitemap_frontpage_changefreq', 86400));
 
@@ -561,50 +460,7 @@ function xmlsitemap_update_6201() {
 function xmlsitemap_update_6202() {
   $ret = array();
   if (!db_table_exists('xmlsitemap_sitemap')) {
-    $schema['xmlsitemap_sitemap'] = array(
-      'fields' => array(
-        'smid' => array(
-          'description' => 'Sitemap ID',
-          'type' => 'serial',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-        ),
-        'context_hash' => array(
-          'description' => 'The MD5 hash of the context field.',
-          'type' => 'varchar',
-          'length' => 32,
-          'not null' => TRUE,
-          'default' => '',
-        ),
-        'context' => array(
-          'description' => 'Serialized array with the sitemaps context',
-          'type' => 'text',
-          'not null' => TRUE,
-        ),
-        'updated' => array(
-          'type' => 'int',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => 0,
-        ),
-        'links' => array(
-          'type' => 'int',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => 0,
-        ),
-        'chunks' => array(
-          'type' => 'int',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => 0,
-        ),
-      ),
-      'primary key' => array('smid'),
-      'unique keys' => array(
-        'context_hash' => array('context_hash'),
-      ),
-    );
+    $schema = xmlsitemap_schema();
     db_create_table($ret, 'xmlsitemap_sitemap', $schema['xmlsitemap_sitemap']);
   }
 
