Wrong index name when a namespace prefix is not specified in the schema tool for DynamoDB
(defn- get-table-name-without-prefix
[{:keys [prefix] :as schema}]
- (str/replace-first (get-table-name schema)
- (java.util.regex.Pattern/compile (str prefix \_)) ""))
+ (let [table-name (get-table-name schema)]
+ (if prefix
+ (str/replace-first table-name
+ (java.util.regex.Pattern/compile (str prefix \_))
+ "")
+ table-name)))
(defn get-index-name
[schema key-name]
