Umbraco 数据库问题 - 添加自定义表
我正在开发一个由 Umbraco 管理的网站。 我需要存储有关图像和客户的数据。 我认为没有任何方法可以将这些数据存储在现有表中。
我是否有任何理由不应该将需要的表添加到 Umbraco 数据库中,而不是创建一个单独的数据库? 到目前为止,我喜欢 Umbraco,但文档有点薄,而且我还没有找到任何建议。
TIA
I'm working on a site managed by Umbraco. I need to store data about images and clients. I don't think there is any way I can store that data in the existing tables.
Is there any reason I shouldn't add the tables I'll need to the Umbraco database, rather than creating a separate DB? I like Umbraco so far but the documentation is a little thin and I haven't found any suggestions one way or the other.
TIA
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用 Umbraco 构建了一个网站,其中包含一个带有车辆数据库的单独应用程序。 我使用了与 Umbraco 使用的数据库相同的数据库,并在所有自定义应用程序表前添加了几个字母以方便区分它们(例如:vehicles_xxx)。
我对这种安排没有任何问题,并且不认为存在太大风险。 当然,升级 Umbraco 时需要小心(在完全测试之前切勿在实时环境中升级,最好在本地进行),但是升级脚本不太可能更改或删除它不知道的任何表。
现在有大量的 doco 可用于 umbraco - 比我开始时多得多。但是像这样的问题总是最适合论坛。 :)
一切顺利
格雷格
I have built a site using Umbraco, with a separate application with a database of vehicles. I used the same database as Umbraco is using, and prefixed all my custom app tables with a few letters to distinguish them easily (eg: vehicles_xxx)
I have had no problems with this arrangement, and don't believe there's much risk involved. Of course you'll need to take care when upgrading Umbraco (never upgrade in the live environment before fully testing, and preferably do it locally anyway), however its unlikely an upgrade script will ever alter or delete any tables that it does not know about.
There's heaps of doco available for umbraco now - much more than when i started.. however a question like this is always best for the forums. :)
all the best
greg
您可以使用 Umbraco API 来存储和检索数据,并享受不必担心表等问题的轻松。 或者您创建自己的表。 按照 Gregorius 所说的去做 - 使用 umbraco db 就可以了。
您的选择取决于:
如果没有 - 那么请使用 Umbraco API
其余答案您可以在 http://our.umbraco.org< 上找到/a>
/杰斯珀·奥德鲁普
You might use the Umbraco API to store and retrieve your data and enjoy the ease of not having to worry bout tables and much more. Or you create your own tables. Do as Gregorius says - using umbraco db is fine.
Your choice depends on:
If not - then go with Umbraco API
The rest of the answers you'll find on http://our.umbraco.org
/Jesper Ordrup