未使用的字段会发生什么
由于 RedBean 自行创建所有列,如果我不再需要字段会发生什么情况。有没有一种简单的方法可以删除它而不删除表并丢失所有数据?
这个问题可以自动解决吗?如果我手动删除该列,RedBean 将如何反应?
Since RedBean creates all columns by itself what would happen if I don't need a field any more. Is there an easy way to remove it without deleting the table and lose all data?
Can this be solved automaticaly or how would RedBean react if I delete the column manually?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以通常的方式从 MySQL 客户端(例如 phpMyAdmin 或 SQLYog)或 MySQL 控制台删除表列。
RedBean 不会因您担心的这种“外部干预”而感到困惑,因为它在每个 PHP 脚本执行上运行,并且据我所知,跨调用不携带任何状态。它实际上只是数据存储的抽象。
有趣的是,RedBean Wiki 似乎根本没有谈论这类事情。
Delete the table column in the usual way from your MySQL client (say, phpMyAdmin or SQLYog) or from the MySQL console.
RedBean can't get confused by this "external meddling" that you're worried about, because it runs on each PHP script execution and, to the best of my knowledge, carries no state across invocations. It's really just an abstraction over data storage.
Interestingly, the RedBean Wiki doesn't appear to talk about this sort of thing at all.