-
-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
Description
Redshift backend cannot provide the following features
- Add, modify, or delete PRIMARY KEY columns
- Add, modify, or delete UNIQUE columns
- Add, modify, or delete REFERENCES (foreign key) columns
- Add NOT NULL columns without DEFAULT
- Modify column for: SET DEFAULT, DROP DEFAULT, SET NOT NULL, DROP NOT NULL
- 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:
- Amazon Redshift Maintenance (February 20th - March 21st 2019): You can now use the ALTER TABLE command to increase the size of VARCHAR columns.