 
             "ALTER TABLE catalog_resources DROP CONSTRAINT catalog_resources_pkey"
             "ALTER TABLE catalog_resources ADD CONSTRAINT catalog_resources_pkey PRIMARY KEY (catalog_id, type, title)"])))
+
+(defn reset-catalog-sequence-to-latest-id []
+  (fix-identity-sequence "catalogs" "id"))
 
 ;; The available migrations, as a map from migration version to migration function.
 (def migrations

  [table]
  (drop-constraints table "foreign key"))

(defn initialize-store
  "Create the initial database schema."
  []

   17 use-bigint-instead-of-catalog-hash
   18 add-index-on-exported-column
   19 differential-edges
   20 differential-catalog-resources
   21 reset-catalog-sequence-to-latest-id})

(def desired-schema-version (apply max (keys migrations)))

