diff --git a/playhouse/reflection.py b/playhouse/reflection.py index ff26f6a2f..c534b04a2 100644 --- a/playhouse/reflection.py +++ b/playhouse/reflection.py @@ -92,7 +92,8 @@ def get_field_parameters(self): if self.primary_key and not issubclass(self.field_class, AutoField): params['primary_key'] = True if self.default is not None: - params['constraints'] = '[SQL(\'DEFAULT %s\')]' % self.default + params['constraints'] = '[SQL("DEFAULT %s")]' % \ + self.default.replace('"', '\\"') # Handle ForeignKeyField-specific attributes. if self.is_foreign_key():