小编ran*_*jan的帖子

如何在 django 中创建不同模式的表?

我在 django 项目中使用 postgresql 数据库。

我的项目中有多个应用程序。

users/
    UserProfile model
myapp/
    CustomModel model
Run Code Online (Sandbox Code Playgroud)

现在我需要在模式UserProfile中创建表public并且CustomModel需要在名为的单独模式中创建表myapp

如何实现这个以及实现这个之后我将来是否需要更改查询或迁移命令中的任何内容?

python django postgresql django-models django-orm

0
推荐指数
1
解决办法
2749
查看次数

标签 统计

django ×1

django-models ×1

django-orm ×1

postgresql ×1

python ×1