Skip to content

[INFO] django-redshift-backend cannot provide change column for: PRIMARY, UNIQUE, FK, NOT NULL #96

@shimizukawa

Description

@shimizukawa

Redshift backend cannot provide the following features

  1. Add, modify, or delete PRIMARY KEY columns
  2. Add, modify, or delete UNIQUE columns
  3. Add, modify, or delete REFERENCES (foreign key) columns
  4. Add NOT NULL columns without DEFAULT
  5. Modify column for: SET DEFAULT, DROP DEFAULT, SET NOT NULL, DROP NOT NULL
  6. RENAME and TYPE change in a transaction.

In Redshift, these are only possible when creating a new table.
The alternative is to recreate the table and insert data into the new table from old table. However, this process cannot be provided as a feature of django-redshift-backend because it is too difficult to perform this process with automatic migration and the impact of failure would be significant.

For more information, please refer to the following page.
https://docs.aws.amazon.com/en_us/redshift/latest/dg/r_ALTER_TABLE.html

NOTE:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions