     (let [session (:session this)]
       (check-session session "Cassandra")
 
-      (let [keyspace-config (:keyspace (:options this))]
+      (let [keyspace-config (:keyspace (:options this))
+            replication     {:replication (:replication keyspace-config)}]
+
+        (logger/info "Creating the keyspace...")
         (alia/execute
          session
-         (hayt/create-keyspace (hayt/if-exists false)
-                               (:name keyspace-config)
-                               (hayt/with (:details keyspace-config))))
+         (hayt/create-keyspace (:name keyspace-config)
+                               (hayt/if-exists false)
+                               (hayt/with replication)))
 
-        (hayt/create-table
-         (hayt/if-exists false)
-         storage-name
-         (hayt/column-definitions {:name :varchar
-                                  ;; int because we use epoch time
-                                  :timestamp :int
-                                  :applies :Boolean
-                                  :primary-key [:name :timestamp]}))
+        (logger/info "Creating migration storage...")
+        (alia/execute
+         session
+         (hayt/create-table
+          storage-name
+          (hayt/if-exists false)
+          (hayt/column-definitions {:name :varchar
+                                    ;; int because we use epoch time
+                                    :timestamp :int
+                                    :applies :Boolean
+                                    :primary-key [:name :timestamp]})))
 
         (assoc this :keyspace (:name keyspace-config)))))
 

  (try
    (alia/execute session (format "USE %s;" keyspace))
    (catch clojure.lang.ExceptionInfo e
      (throw
       (ex-info "Keyspace is not present. You need to migrate first." {})))))

(defn cassandra-config
  "Returns the cassandra configuration"

  (start [this]
    ;; Validate Configuration
    (spec/valid? ::cassanda-configuration options)
    (logger/info "Connecting to Cassandra cluster...")

    ;; Connect to the cluster and select the default keyspace
    (let [session          (connect options)
          keyspace         (:name (:keyspace options))]
      (select-keyspace session keyspace)
      (logger/info "Connected to cassandra cluster.")
      (assoc this :session session :keyspace keyspace)))

  (stop [this]
