1
0
mirror of https://github.com/django/django.git synced 2025-10-30 09:06:13 +00:00

Implement primary key changing

This commit is contained in:
Andrew Godwin
2012-09-04 12:53:31 -04:00
parent d865503389
commit cd583d6dbd
4 changed files with 78 additions and 11 deletions

View File

@@ -21,3 +21,6 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
alter_string_set_null = 'MODIFY %(column)s %(type)s NULL;'
alter_string_drop_null = 'MODIFY %(column)s %(type)s NOT NULL;'
sql_create_pk = "ALTER TABLE %(table)s ADD CONSTRAINT %(name)s PRIMARY KEY (%(columns)s)"
sql_delete_pk = "ALTER TABLE %(table)s DROP PRIMARY KEY"