diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 46022a97b1..9b08bc097a 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -91,6 +91,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_bulk_insert = True supports_tablespaces = True supports_sequence_reset = False + supports_combined_alters = False class DatabaseOperations(BaseDatabaseOperations): diff --git a/django/db/backends/oracle/creation.py b/django/db/backends/oracle/creation.py index f7d43ae7b6..b1a8782aa9 100644 --- a/django/db/backends/oracle/creation.py +++ b/django/db/backends/oracle/creation.py @@ -49,8 +49,8 @@ class DatabaseCreation(BaseDatabaseCreation): data_type_check_constraints = { 'BooleanField': '%(qn_column)s IN (0,1)', 'NullBooleanField': '(%(qn_column)s IN (0,1)) OR (%(qn_column)s IS NULL)', - 'PositiveIntegerField': '"%(qn_column)s" >= 0', - 'PositiveSmallIntegerField': '"%(qn_column)s" >= 0', + 'PositiveIntegerField': '%(qn_column)s >= 0', + 'PositiveSmallIntegerField': '%(qn_column)s >= 0', } def __init__(self, connection): diff --git a/django/db/backends/oracle/schema.py b/django/db/backends/oracle/schema.py index b86e0857bb..4a679e79eb 100644 --- a/django/db/backends/oracle/schema.py +++ b/django/db/backends/oracle/schema.py @@ -2,4 +2,13 @@ from django.db.backends.schema import BaseDatabaseSchemaEditor class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): - pass + + sql_create_column = "ALTER TABLE %(table)s ADD %(column)s %(definition)s" + sql_alter_column_type = "MODIFY %(column)s %(type)s" + sql_alter_column_null = "MODIFY %(column)s NULL" + sql_alter_column_not_null = "MODIFY %(column)s NOT NULL" + sql_alter_column_default = "MODIFY %(column)s DEFAULT %(default)s" + sql_alter_column_no_default = "MODIFY %(column)s DEFAULT NULL" + sql_delete_column = "ALTER TABLE %(table)s DROP COLUMN %(column)s" + sql_delete_table = "DROP TABLE %(table)s CASCADE CONSTRAINTS" +