{"id":594,"date":"2010-07-16T20:14:48","date_gmt":"2010-07-16T11:14:48","guid":{"rendered":"http:\/\/unos.biz\/blog\/archives\/594"},"modified":"2010-07-21T14:49:08","modified_gmt":"2010-07-21T05:49:08","slug":"symfony-doctrine%e3%81%a7migrate","status":"publish","type":"post","link":"http:\/\/unos.biz\/blog\/archives\/594","title":{"rendered":"symfony doctrine\u3067migrate"},"content":{"rendered":"<p>symfony1.4.6\u3001doctrine\u3067\u3001migrate\u3057\u3064\u3064\u958b\u767a\u3001\u306e\u30c6\u30b9\u30c8\u4e2d\u3002\u601d\u3044\u306e\u5916\u306f\u307e\u308a\u3069\u3053\u308d\u304c\u591a\u3044\u306e\u3067\u500b\u4eba\u7684\u30e1\u30e2\u3002\u8aa4\u89e3\u3057\u3066\u3044\u308b\u3001\u4f7f\u3044\u65b9\u304c\u30aa\u30ab\u30b7\u30a4\u306a\u3069\u3042\u308a\u307e\u3057\u305f\u3089\u3054\u6307\u6458\u304f\u3060\u3055\u3044\u3002\u3061\u306a\u307f\u306b\u3001\u6b63\u3057\u3044\u4f7f\u3044\u59cb\u3081\u306e\u305f\u3081\u306e\u624b\u9806\u306f<a href=\"http:\/\/d.hatena.ne.jp\/innx_hidenori\/20100626\/1277562937\" target=\"_blank\">\u3053\u3061\u3089<\/a>\u304c\u8a73\u3057\u3044\u3002<\/p>\n<p><strong>\u578b\u306btext\u3060\u3068\u304bdatetime\u3060\u3068\u304b\u66f8\u3044\u3066\u304a\u304f\u3068\u306f\u307e\u308b      <br \/><\/strong>\u578b\u306btype: text\u3060\u3068\u304b\u66f8\u3044\u3066\u304a\u3044\u3066\u3082\u3001\u666e\u901a\u306b\u4f7f\u3046\u5206\u306b\u306f\u4f7f\u3048\u3066\u3057\u307e\u3046\u3002\u305f\u3060\u3001doctrine:migrate\u3059\u308b\u3068\u3001syntax error\u304c\u51fa\u3066\u3057\u307e\u3046\u3002\u3069\u3046\u3082\u3001text\u3068\u3060\u3051\u66f8\u3044\u3066\u304a\u304f\u3068\u3001hoge: { type: text } \u3092SQL\u306b\u3059\u308b\u3068\u304d\u3001hoge text()\u3068\u69cb\u7bc9\u3057\u3066\u3057\u307e\u3063\u3066\u30a8\u30e9\u30fc\u306b\u306a\u308b\u6a21\u69d8\u3002string(\u9577\u3055)\u3068\u6307\u5b9a\u3057\u3066\u304a\u3051\u3070OK\u3002     <br \/>\u540c\u69d8\u306b\u3001datetime\u3082migrate\u3092\u4f7f\u308f\u306a\u3044\u304b\u304e\u308a\u901a\u308b\u306e\u3060\u3051\u3069\u3001migrate\u4f7f\u3046\u3068\u30a8\u30e9\u30fc\u3002timestamp\u3068\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p><strong>\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u4f7f\u3063\u3066\u306a\u3044\u306e\u3067\u30a8\u30e9\u30fc\u51fa\u305f\u3089\u9762\u5012      <br \/><\/strong><strike>migrate\u30bf\u30b9\u30af\u306e\u4e2d\u3067\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u51e6\u7406\u3092\u884c\u3063\u3066\u3044\u306a\u3044\u6a21\u69d8<\/strike>(\u5618\u3002\u3061\u3083\u3093\u3068\u66f8\u3044\u3066\u3042\u3063\u305f)\u3002\u305d\u306e\u305b\u3044\u3067\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u3067\u308b\u3068\u4e2d\u9014\u534a\u7aef\u306b\u30af\u30a8\u30ea\u304c\u901a\u3063\u305f\u72b6\u614b\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3002\u904b\u7528\u30c7\u30fc\u30bf\u304c\u306a\u3051\u308c\u3070(\u958b\u767a\u30b5\u30fc\u30d0\u3067\u3042\u308c\u3070)\u3001doctrine:drop-db\u3057\u3066doctrine:create-db\u3057\u3066\u3001doctrine:migrate\u3059\u308c\u3070\u3044\u3044\u304c\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f\u7d50\u69cb\u6ce8\u610f\u304c\u5fc5\u8981\u3002\u3064\u3046\u304b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304f\u3089\u3044\u8d70\u3089\u305b\u3066\u304f\u3060\u3055\u3044\uff1e\u4e2d\u306e\u4eba<\/p>\n<p>\u304a\u6c17\u8efd\u306b\u4f7f\u3048\u305d\u3046\u3067\u601d\u3063\u305f\u3088\u308a\u306f\u307e\u308b\u3002\u305f\u3060\u3001\u7d99\u7d9a\u7684\u306b\u958b\u767a\u3057\u7d9a\u3051\u308b\u624b\u5408\u3044\u306b\u306f\u3053\u308c\u304c\u306a\u3044\u3068\u56f0\u308b\u306e\u3067\u3001\u306f\u307e\u3089\u306a\u3044\u3088\u3046\u306b\u4f7f\u3063\u3066\u307f\u3088\u3046\u3068\u601d\u3046\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u8ffd\u8a18\uff1a    <br \/>sfDoctrineMigrateTask\u3068Migrate\u3092\u8aad\u3093\u3067\u307f\u308b\u3068\u3001beginTransaction\u304c\u3061\u3083\u3093\u3068\u66f8\u3044\u3066\u3042\u3063\u305f\u3002\u30af\u30a8\u30ea\u30ed\u30b0\u3092\u898b\u3066\u307f\u308b\u3068\u78ba\u304b\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u639b\u3051\u3066\u3044\u308b\u3002\u306a\u3093\u3067dry-run\u3059\u308b\u3060\u3051\u3067\u554f\u984c\u304c\u8d77\u3053\u3063\u305f\u306e\u304b\u3061\u3087\u3063\u3068\u308f\u304b\u3089\u305a\u3002<\/p>\n<pre>100716 20:30:38     2 Connect   shell@localhost on shell\n                    2 Query     SET NAMES utf8\n                    2 Query     SET NAMES 'UTF8'\n                    2 Query     CREATE TABLE migration_version (version INT) ENGINE = INNODB\n                    2 Query     SELECT version FROM migration_version\n                    2 Query     <strong>START TRANSACTION<\/strong>\n                    2 Query     SELECT version FROM migration_version\n                    2 Query     CREATE TABLE (\u7565\n                    2 Query     ALTER TABLE (\u7565\n                    2 Query     CREATE INDEX (\u7565\n                    2 Query     <strong>commit<\/strong>\n                    2 Query     SELECT version FROM migration_version\n                    2 Query     UPDATE migration_version SET version = 12\n                    2 Quit<\/pre>\n<p>\u8ffd\u8a18\uff1a<br \/>\n  <br \/>\u304a\u305d\u3089\u304f\u3001MySQL\u306eautocommit\u3092\u6bba\u3057\u3066\u3044\u306a\u3044\u304b\u3089\u3060\u3068\u63a8\u6e2c\u3057\u3066\u3044\u3066\u3001\u63a5\u7d9a\u6642\u306b\u307e\u305aautocommit\u3092\u30aa\u30d5\u306b\u3059\u308b\u30af\u30a8\u30ea\u3092\u6295\u3052\u308b\u65b9\u6cd5\u3092\u8abf\u67fb\u4e2d\u3002symfony\u305d\u306e\u3082\u306e\u306e\u30bd\u30fc\u30b9\u66f8\u304d\u63db\u3048\u3061\u3083\u3046\u306e\u304c\u65e9\u3044\u306e\u3060\u3051\u3069\u305d\u308c\u306f\u3061\u3087\u3063\u3068\u306d\u3047\u3002<\/p>\n<p>\u8ffd\u8a18\uff1a<br \/>\n  <br \/>\u3082\u3063\u3068\u6839\u672c\u7684\u306a\u8a71\u3060\u3063\u305f\u3002MySQL\u306fCREATE TABLE\u7684\u306aDDL\u3092rollback<strong>\u3067\u304d\u306a\u3044<\/strong>\u3002\u306a\u3093\u3060\u305d\u308c\u3002\u3042\u307b\u304b\u3044\u3002\u30c6\u30f3\u30dd\u30e9\u30ea\u30c6\u30fc\u30d6\u30eb\u3053\u3055\u3048\u308b\u3088\u3046\u306a\u5b9f\u88c5\u3060\u3063\u305f\u308a\u3059\u308b\u3068\uff47\uff44\uff47\uff44\u306b\u306a\u308b\u3063\u3066\u308f\u3051\u3067\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>symfony1.4.6\u3001doctrine\u3067\u3001migrate\u3057\u3064\u3064\u958b\u767a\u3001\u306e\u30c6\u30b9\u30c8\u4e2d\u3002\u601d\u3044\u306e\u5916\u306f\u307e\u308a\u3069\u3053\u308d\u304c\u591a\u3044\u306e\u3067\u500b\u4eba\u7684\u30e1\u30e2\u3002\u8aa4\u89e3\u3057\u3066\u3044\u308b\u3001\u4f7f\u3044\u65b9\u304c\u30aa\u30ab\u30b7\u30a4\u306a\u3069\u3042\u308a\u307e\u3057\u305f\u3089\u3054\u6307\u6458\u304f\u3060\u3055\u3044\u3002\u3061\u306a\u307f\u306b\u3001\u6b63\u3057\u3044\u4f7f\u3044\u59cb\u3081\u306e\u305f\u3081\u306e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"_links":{"self":[{"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/posts\/594"}],"collection":[{"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/comments?post=594"}],"version-history":[{"count":3,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/posts\/594\/revisions"}],"predecessor-version":[{"id":598,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/posts\/594\/revisions\/598"}],"wp:attachment":[{"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/media?parent=594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/categories?post=594"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/tags?post=594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}