diff --git a/src/sqlalchemy_cratedb/compiler.py b/src/sqlalchemy_cratedb/compiler.py index 7b2c5cc..59876d6 100644 --- a/src/sqlalchemy_cratedb/compiler.py +++ b/src/sqlalchemy_cratedb/compiler.py @@ -200,6 +200,17 @@ def visit_unique_constraint(self, constraint, **kw): ) return + def visit_create_index(self, create, **kw) -> str: + """ + CrateDB does not support `CREATE INDEX` statements. + """ + warnings.warn( + "CrateDB does not support `CREATE INDEX` statements, " + "they will be omitted when generating DDL statements.", + stacklevel=2, + ) + return "SELECT 1" + class CrateTypeCompiler(compiler.GenericTypeCompiler): def visit_string(self, type_, **kw):