3

我正在构建一个连接到 PostgreSQL 数据库的 Django 应用程序,并且该应用程序使用的凭据对相关表授予的权限非常有限。

我希望能够使用 south 来管理数据库迁移,但鉴于这与 Django 使用的凭据相同,这会引发错误,因为 south 无法对它不拥有的表进行任何更改。

有没有办法指定南应该使用一组不同的凭据来管理迁移,而不是由应用程序设置指定的?

4

1 回答 1

4

是:有另一组具有不同凭据的南迁移设置,并--settings在调用migrate命令时使用该选项。

NB : to avoid DRY violation, you can as well start your special settings file by importing * from the normal settings and just override the DB credentials.

于 2013-10-14T13:37:49.413 回答