-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
プラグインでのDBALベストプラクティスについて #1328
Comments
他にもありますが、ぜひ、migration自体のベストプラクティスを定義していった方が良いかと思います。 |
本当は、やっちゃいけないのかもしれませんが、こんなことを試みたことがあります。 migration のベストプラクティスを定義しない理由は無いと思いますが、リソースがそこまで追いついていないのが実情かと... |
@nanasess |
何がベストプラティクスとして定義できるかも、用意でききれていないのですが、2系でプラグイン開発時のセキュリティガイド作ったように、そうしていきたいのは山々です。 |
@Yangsin |
ec-cube.github.ioにマイグレーションの作成についてissue起案しました |
上記のとおり、github.io側にIssue作成させていただきましたので、こちらはCLOSEさせていただきます。 |
現状、プラグインのマイグレーション時に、
executeUpdate()
を利用していますが、変数をそのままSQL文に入れるなど、あまりよいとは言えない例が多くあります。・冪等性を考慮したアップデートについて
http://qiita.com/iakio/items/adf1f923d1cfccbba765
こちらにあるような形が良いかと思います。
・INSERT または UPDATE について
現状、なぜか executeUpdate を利用していますが、こちらは insert もしくは update のほうが安全にSQLを実行できます。
http://doctrine-orm.readthedocs.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html
The text was updated successfully, but these errors were encountered: