         }
         
         let indexStatements = try columns
-            .compactMap { $0.indexDefinition(in: name) }
+            .compactMap { $0.indexDefinition(in: name, ifNotExists: ifNotExists) }
             .map { try $0.sql(db) }
         statements.append(contentsOf: indexStatements)
         return statements.joined(separator: "; ")

                let statement = chunks.joined(separator: " ")
                statements.append(statement)
                
                if let indexDefinition = column.indexDefinition(in: name) {
                    try statements.append(indexDefinition.sql(db))
                }
            case let .rename(oldName, newName):

        return chunks.joined(separator: " ")
    }
    
    fileprivate func indexDefinition(in table: String, ifNotExists: Bool) -> IndexDefinition? {
        switch index {
        case .none: return nil
        case .unique: return nil
