We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b1f97e commit 4b5b12cCopy full SHA for 4b5b12c
AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/Storage/SQLite/ModelSchema+SQLite.swift
@@ -118,10 +118,13 @@ extension ModelSchema {
118
/// Create SQLite indexes corresponding to secondary indexes in the model schema
119
func createIndexStatements() -> String {
120
var statement = ""
121
- for index in indexes {
122
- if case let .index(fields, name) = index, let name = name {
123
- statement += CreateIndexStatement(modelSchema: self, fields: fields, indexName: name).stringValue
124
- }
+ for case let .index(fields, name?) in indexes {
+ statement += CreateIndexStatement(
+ modelSchema: self,
+ fields: fields,
125
+ indexName: name
126
+ )
127
+ .stringValue
128
}
129
return statement
130
0 commit comments