Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的 vqmod 中进行一个操作,如果store_manager表存在,不要做任何事情。否则创建表。我怎样才能实现它?
store_manager
如果您创建模块,则将代码放入模块的安装方法中,如果用户在您的模块名称附近的管理面板中单击安装,该方法将运行。
如果它不会模块,那么在第一次调用 modEl 方法时,您可以检查表是否存在,然后使用 SQL 创建表,如下所示:
CREATE TABLE store_manager (id INT NOT NULL);