如何使“symfony教条:build-sql”任务生成“DROP”文件? [英] How to make 'symfony doctrine:build-sql' task generate 'DROP' statments?
本文介绍了如何使“symfony教条:build-sql”任务生成“DROP”文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法使 symfony教义:build-sql 任务在 CREATE TABLE 之前生成 DROP 状态,因为它 symfony propel :build-sql 是吗?
?
Is there a way to make symfony doctrine:build-sql task generate DROP statments before CREATE TABLE ones as it symfony propel:build-sql does ? ?
推荐答案
没有这样的可能性,但是可以在插入之前运行doctrine:drop-db任务SQL。一个常规的原则是:
There is no such possibility, but you can run the doctrine:drop-db task before inserting the the SQL. A regular way with doctrine is:
> symfony doctrine:build-sql
> symfony doctrine:drop-db
> symfony doctrine:insert-sql
这篇关于如何使“symfony教条:build-sql”任务生成“DROP”文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文